Различия
Здесь показаны различия между выбранной ревизией и текущей версией данной страницы.
wiki:automatic_dlja_keenetic_a [2013/07/16 09:50] staubnull |
wiki:automatic_dlja_keenetic_a [2014/01/11 00:39] (текущий) staubnull |
||
---|---|---|---|
Строка 51: | Строка 51: | ||
export LD_LIBRARY_PATH=$MOUNT/lib:$MOUNT/usr/lib:/lib:/usr/lib | export LD_LIBRARY_PATH=$MOUNT/lib:$MOUNT/usr/lib:/lib:/usr/lib | ||
- | start_daemon() { | + | start() { |
- | $BIN -v 2 -c $CONFIGFILE -l $LOGFILE | + | $BIN -v 2 -c $CONFIGFILE -l $LOGFILE |
} | } | ||
- | stop_daemon() { | + | stop() { |
- | killall automatic | + | killall automatic |
+ | } | ||
+ | |||
+ | restart() { | ||
+ | killall automatic | ||
+ | sleep 10 | ||
+ | $BIN -v 2 -c $CONFIGFILE -l $LOGFILE | ||
} | } | ||
case "$1" in | case "$1" in | ||
- | start) | + | start) |
- | start_daemon | + | start |
- | ;; | + | ;; |
- | stop) | + | stop) |
- | stop_daemon | + | stop |
- | ;; | + | ;; |
- | restart) | + | restart) |
- | stop_daemon | + | stop |
- | sleep 5 | + | start |
- | start_daemon | + | ;; |
- | ;; | + | *) |
- | *) | + | echo "Usage: $0 {start|stop|restart}" |
- | echo "Usage: $0 {start|stop|restart}" | + | ;; |
- | ;; | + | |
esac | esac | ||