in reply to safe to use system
Running these scripts from cron as root is usually not a good idea. You want to make sure the ownership/permissions on the scripts themselves are correct. Depending on what you mean by "ended without errors", you might be able to just get away with checking the exit status. On the other hand, the script may complete but still encounter problems.
If this is the case and you want to be sure it is safe to continue, here is how I would do it:
Now this method is not without gotchas. Perhaps the script ran fine but couldn't create the "ok" file. Maybe someone deleted it during the window of opportunity (after the first script created it and the next script read it).
Cheers - L~R
|
|---|