Skip to content

Commit

Permalink
Fix several minor issues with Debian sysvinit script
Browse files Browse the repository at this point in the history
- add `set -e` to make failing commands bail the script
- remove trailing `exit 0` which is just extraneous anyhow
- adjust `status_of_proc` options to pass in `$DOCKER_DESC` so we get consistently styled messages like `Docker is running` or `Docker is not running` or `could not access PID file for Docker`

Signed-off-by: Andrew Page <admwiggin@gmail.com>
  • Loading branch information
tianon committed Aug 7, 2014
1 parent 860ab46 commit 478fdaf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions contrib/init/sysvinit-debian/docker
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
set -e

### BEGIN INIT INFO
# Provides: docker
Expand Down Expand Up @@ -130,13 +131,11 @@ case "$1" in
;;

status)
status_of_proc -p "$DOCKER_SSD_PIDFILE" "$DOCKER" docker
status_of_proc -p "$DOCKER_SSD_PIDFILE" "$DOCKER" "$DOCKER_DESC"
;;

*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac

exit 0

0 comments on commit 478fdaf

Please sign in to comment.