I have this script :
#!/bin/bash if [ ! -e /home/mam/restart.lock ]; then touch /home/mam/restart.lock killall arma3server /home/mam/arma3server & fi
I made a cron like that :
* * * * * /home/mam/script.sh
I delete the restart.lock, launch the script by /home/mam/script.sh and it's work : it creates the file, and start the server.
But, when the crontab does it, it just creates the .lock file and doesn't start my server.
Can you explain me why and how to fix it?