Skip to content

Commit

Permalink
Merge pull request #201 from kardapoltsev/master
Browse files Browse the repository at this point in the history
testing for /var/run/app_name directory instead of file existence in debian and rpm templates
  • Loading branch information
muuki88 committed Mar 23, 2014
2 parents 2a55a05 + 1b640e9 commit 805e954
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN_CMD="${{chdir}}/bin/${{app_name}}"

start_daemon() {
log_daemon_msg "Starting" "${{app_name}}"
[ -e "/var/run/${{app_name}}" ] || install -d -o"$DAEMON_USER" -m750 "/var/run/${{app_name}}"
[ -d "/var/run/${{app_name}}" ] || install -d -o "$DAEMON_USER" -m750 "/var/run/${{app_name}}"
start-stop-daemon --background --chdir ${{chdir}} --chuid "$DAEMON_USER" --make-pidfile --pidfile "$PIDFILE" --exec "$RUN_CMD" --start -- $RUN_OPTS
log_end_msg $?
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ start() {
[ $retval -eq 0 ] && touch ${lockfile} && success || failure

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

0 comments on commit 805e954

Please sign in to comment.