I have a script that is launched by cron every day.
The launch command looks something like this: flock -n /tmp/mylock.LOCK /path/to/script/script.sh
Script script.sh updates configuration files for my server and tries to restart it (if it is running, it restarts it, if not - launches it). But the problem is that this server starts holding the lock /tmp/mylock.LOCK, which prevents script.sh from launching the next day.
Can I somehow run the script to restart my server without acquiring the file lock in the process?
OS: Ubuntu 12.04