Леонид Харламов Posted September 25 Share Posted September 25 Как настроить автозапуск крона после перезагрузки? Quote Link to comment Share on other sites More sharing options...
0 Rbuha Posted September 26 Share Posted September 26 6 часов назад, Леонид Харламов сказал: Как настроить автозапуск крона после перезагрузки? Debian, Entware? Quote Link to comment Share on other sites More sharing options...
0 Леонид Харламов Posted October 1 Author Share Posted October 1 (edited) Добавил скрипт S5crond для автозапуска в /opt/etc/init.d: #!/bin/sh SCRIPT=/opt/sbin/crond PIDFILE=/opt/var/run/crond.pid ARGS="-b" start() { if [ -f $PIDFILE ] && kill -0 $(cat $PIDFILE); then echo 'Service crond is already running' >&2 return 1 fi $SCRIPT $ARGS echo 'Started crond service' } stop() { if [ ! -f "$PIDFILE" ] || ! kill -0 $(cat "$PIDFILE"); then echo 'Service crond is not running' >&2 return 1 fi echo 'Stopping crond service...' kill -15 $(cat "$PIDFILE") && rm -f "$PIDFILE" } status() { if [ -f $PIDFILE ] && kill -0 $(cat $PIDFILE); then echo 'Service crond is running' else echo 'Service crond is stopped' fi } case "$1" in start) start ;; stop) stop ;; status) status ;; restart) stop start ;; *) echo "Usage: $0 {start|stop|restart|status}" esac Edited October 1 by Леонид Харламов Quote Link to comment Share on other sites More sharing options...
Question
Леонид Харламов
Как настроить автозапуск крона после перезагрузки?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.