Permalink
Browse files

update init.d script

  • Loading branch information...
1 parent 5a8d74f commit 7777ab37f4f179a436e3ed6ae38b94a786120ac2 @posativ committed Oct 13, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 README.md
View
10 README.md
@@ -37,18 +37,18 @@ CMD=/usr/local/bin/weave-minimal
PORT=8080
DBPATH=/var/lib/weave-minimal/
-DAEMON_OPTS="--data-dir=$DBPATH --enable-registration --port=$PORT"
-if [! -d $DBPATH ]; then
+if [ ! -d $DBPATH ]; then
mkdir /var/lib/weave-minimal
+ chown www /var/lib/weave-minimal
fi
case $1 in
start)
echo -n "Starting $NAME: "
- start-stop-daemon --start --pidfile /var/run/$NAME.pid \
- --chuid $USER --make-pidfile --background --exec $CMD \
- -- $DAEMON_OPTS || true
+ start-stop-daemon --start --background --pidfile /var/run/$NAME.pid \
+ --chuid $USER --make-pidfile --exec $CMD -- --data-dir=$DBPATH \
+ --port=$PORT --enable-registration
echo "$NAME."
;;
stop) start-stop-daemon --stop --pidfile /var/run/$NAME.pid

0 comments on commit 7777ab3

Please sign in to comment.