Skip to content

Commit 805e954

Browse files
committed
Merge pull request #201 from kardapoltsev/master
testing for /var/run/app_name directory instead of file existence in debian and rpm templates
2 parents 2a55a05 + 1b640e9 commit 805e954

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/main/resources/com/typesafe/sbt/packager/archetypes/systemv/start-debian-template

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ RUN_CMD="${{chdir}}/bin/${{app_name}}"
2525

2626
start_daemon() {
2727
log_daemon_msg "Starting" "${{app_name}}"
28-
[ -e "/var/run/${{app_name}}" ] || install -d -o"$DAEMON_USER" -m750 "/var/run/${{app_name}}"
28+
[ -d "/var/run/${{app_name}}" ] || install -d -o "$DAEMON_USER" -m750 "/var/run/${{app_name}}"
2929
start-stop-daemon --background --chdir ${{chdir}} --chuid "$DAEMON_USER" --make-pidfile --pidfile "$PIDFILE" --exec "$RUN_CMD" --start -- $RUN_OPTS
3030
log_end_msg $?
3131
}

src/main/resources/com/typesafe/sbt/packager/archetypes/systemv/start-rpm-template

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ start() {
6464
[ $retval -eq 0 ] && touch ${lockfile} && success || failure
6565

6666
# Insert pid into pid file for CentOS killproc function
67+
[ -d "/var/run/${{app_name}}" ] || install -d -o "$DAEMON_USER" -m750 "/var/run/${{app_name}}"
6768
echo
6869
echo $PID > ${PIDFILE}
6970
return $retval

0 commit comments

Comments
 (0)