Попробуй вот здесь почитать об этом:
https://sampwiki.blast.hk/wiki/Linux_Server_RU https://sampforum.blast.hk/showthread.php?tid=491318 |
root# /server/checkdayton.sh
/bin/sh: 1: /server/checkdayton.sh: not found
*/2 * * * * /server/checkdayton.sh
/root/server/checkdayton.sh
root# /root/server/checkdayton.sh
/bin/sh: 0: Can't open
#!/bin/sh
PROCESS_COUNT=$(ps -fu root | grep samp03svr | grep -v grep | wc -l)
case $PROCESS_COUNT in
0) /server/samp03svr &
;;
1) #OK, программа уже выполняется
;;
*) #OK, запущено несколько экземпляров программы
;;
esac
#!/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
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")
/root/server/samp03svr &