[Debian-ha-commits] [pcs] 01/01: Update init script to set chdir on start-stop-daemon
Richard Winters
devrik-guest at moszumanska.debian.org
Tue May 5 20:13:39 UTC 2015
This is an automated email from the git hooks/post-receive script.
devrik-guest pushed a commit to branch master
in repository pcs.
commit 5b57d260b91f4e2ce7794ccbe74f6c39f9312cc0
Author: Richard B Winters <rik at mmogp.com>
Date: Tue May 5 16:13:24 2015 -0400
Update init script to set chdir on start-stop-daemon
- Replaces manual cd to /var/lib/pcsd
Change-Id: I162314d15caedf154944383258d73f81d75b292d
Signed-off-by: Richard B Winters <rik at mmogp.com>
---
debian/pcsd.init | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/debian/pcsd.init b/debian/pcsd.init
index 068cfe9..ea54f94 100644
--- a/debian/pcsd.init
+++ b/debian/pcsd.init
@@ -26,6 +26,7 @@ EXEC=ruby
SUB_EXEC=/usr/share/pcsd/ssl.rb
DAEMON=/usr/bin/ruby
DAEMON_ARGS="-I/usr/share/pcsd /usr/share/pcsd/ssl.rb"
+RUN_DIR=/var/lib/pcsd
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
@@ -41,14 +42,13 @@ SCRIPTNAME=/etc/init.d/$NAME
do_start()
{
- cd /var/lib/pcsd
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
- start-stop-daemon --start --quiet --test --exec $DAEMON -- test \
+ start-stop-daemon --start --quiet --chdir $RUN_DIR --test --exec $DAEMON -- test \
|| return 1
- start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_ARGS \
+ start-stop-daemon --start --quiet --chdir $RUN_DIR --exec $DAEMON -- $DAEMON_ARGS \
|| return 2
# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/pcs.git
More information about the Debian-HA-Commits
mailing list