File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ function do_start {
4141}
4242
4343function do_stop {
44- start-stop-daemon --stop --retry=TERM/30/KILL/5 --pidfile " $PID_FILE " --name " $NAME "
44+ start-stop-daemon --stop --retry=TERM/30/KILL/5 --pidfile " $PID_FILE " --exec " $DAEMON "
4545 retval=" $? "
4646 sleep 1
4747 return " $retval "
Original file line number Diff line number Diff line change @@ -32,14 +32,20 @@ function restart_service {
3232 fi
3333}
3434
35+ function create_logdir {
36+ if [[ ! -d $LOG_DIR ]]; then
37+ mkdir -p $LOG_DIR
38+ chown -R $DAEMON_USER :$DAEMON_GROUP $LOG_DIR
39+ fi
40+ }
41+
3542# create user
3643id $DAEMON_USER & > /dev/null
3744if [[ $? -ne 0 ]]; then
3845 useradd --system -U -M $DAEMON_USER -s /bin/false -d /etc/$NAME
3946fi
4047
41- mkdir -p " $LOG_DIR "
42- chown $DAEMON_USER :$DAEMON_GROUP " $LOG_DIR "
48+ create_logdir
4349
4450# set the configuration owner / permissions
4551if [[ -f /etc/$NAME /$NAME .toml ]]; then
You can’t perform that action at this time.
0 commit comments