08.02.2017, 16:59
Переделал.
Ошибки при выполнении в crontab:
Если просто в SSH клиенте прописать
то сервер успешно запускается.
PHP Code:
#!/bin/sh
PROCESS_COUNT=$(ps -fu root | grep samp03svr | grep -v grep | wc -l)
case $PROCESS_COUNT in
0) /root/server/samp03svr &
;;
1) #OK, program is already running once
;;
*) #OK, program is already multiple times
;;
esac
PHP Code:
root# /root/server/checkdayton.sh
/root/server/checkdayton.sh: 1: /root/server/checkdayton.sh: #!/bin/sh
: not found
/root/server/checkdayton.sh: 2: /root/server/checkdayton.sh:
: not found
/root/server/checkdayton.sh: 4: /root/server/checkdayton.sh: Syntax error: word unexpected (expecting "in")
PHP Code:
/root/server/samp03svr &