Skip to content

Commit

Permalink
update init.d script
Browse files Browse the repository at this point in the history
  • Loading branch information
posativ committed Oct 13, 2012
1 parent 5a8d74f commit 7777ab3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -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
Expand Down

0 comments on commit 7777ab3

Please sign in to comment.