Skip to content

Commit

Permalink
Detect already stopped service
Browse files Browse the repository at this point in the history
  • Loading branch information
eproxus committed Feb 17, 2014
1 parent 191ae52 commit 22f7efa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions example/erldapp.init
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ bake_cookie() {

stop() {
checkroot
echo -n "Stopping the $DESC server "
if [ -r $PIDFILE ]; then
echo -n "Stopping the $DESC server "
pid=`cat $PIDFILE`
$ERL -name $TMPNODE -eval "erld_remote:stop(\"elvis\", erldapp)."
if [ $? ] ; then
Expand All @@ -140,8 +140,7 @@ stop() {
fi

else
echo -n "(no pid file) "
failure
echo "$DESC already stopped"
fi
}

Expand Down

0 comments on commit 22f7efa

Please sign in to comment.