Skip to content

Commit d1adff5

Browse files
author
Alice Ferrazzi
committed
elivepatch.init: use folder for log files
1 parent 1666a15 commit d1adff5

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

init/elivepatch.init

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@ DAEMON=/usr/bin/elivepatch-server
88
DAEMON_NAME=elivepatch-server
99
PIDFILE=/var/run/${DAEMON_NAME}.pid
1010

11+
start_pre() {
12+
checkpath -d -o ${DAEMON_USER}:${DAEMON_GROUP} /var/log/${DAEMON_NAME}
13+
}
14+
1115
start () {
1216
ebegin "Starting system ${DAEMON_NAME} daemon"
1317
start-stop-daemon --start --background --pidfile ${PIDFILE} \
1418
--user ${DAEMON_USER}:${DAEMON_GROUP} \
1519
--make-pidfile \
16-
--stdout /var/log/elivepatch-server.log \
17-
--stderr /var/log/elivepatch-server.err \
20+
--stdout /var/log/${DAEMON_NAME}/${DAEMON_NAME}.log \
21+
--stderr /var/log/${DAEMON_NAME}/${DAEMON_NAME}.err \
1822
--exec ${DAEMON} runserver
1923
eend $? "Failed to start ${DAEMON_NAME}"
2024
}

0 commit comments

Comments
 (0)