Answer the question
In order to leave comments, you need to log in
Why doesn't sh script run in crontab?
There is a script:
#!/bin/bash
CHECK='server-release is not running ... failed!' #строка для проверки
STATUS=$(/home/user/server/server/build.sh status) #запись статуса сервера в переменную
if [ "$CHECK" == "$STATUS" ]
then
echo "server is stopped"
rm -f /home/user/server/server/server.pid
/home/user/server/server/build.sh startd
else
echo "server is worked"
fi
Answer the question
In order to leave comments, you need to log in
And so?
* * * * * /bin/bash /etc/starter.sh > /tmp/starter.log 2>&1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question