Permalink
Browse files

Now status works. This script is 95% complete and ready for most Debian

or Ubuntu users. I just need to clean up a few messages and the script a
bit.
  • Loading branch information...
1 parent 66ec88c commit 6dc9650023f58cabfda687dd974d13a3de3d4b6d @tompurl committed Aug 28, 2011
Showing with 5 additions and 29 deletions.
  1. +5 −29 carbon/carbon-cache
  2. BIN carbon/carbon-cache-test-plan.ods
View
@@ -9,7 +9,7 @@
# Description: See Short-Description
### END INIT INFO
-# Author: Tom Purl <tom@tompur.com>
+# Author: Tom Purl <tom@tompurl.com>
# Do NOT "set -e"
@@ -120,27 +120,14 @@ do_stop()
return "$RETVAL"
}
-#
-# Function that sends a SIGHUP to the daemon/service
-#
-do_reload() {
- #
- # If the daemon can reload its configuration without
- # restarting (for example, when it is sent a SIGHUP),
- # then implement that here.
- #
- start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
- return 0
-}
-
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
# TODO If the return code is 0, then print "service started" message
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
- # TODO If the return code is 1, then print "service already started" message
+ # TODO If the return code is 0, then print "service started" message
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
@@ -153,19 +140,9 @@ case "$1" in
esac
;;
status)
- #status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
- # FIXME
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
- #reload|force-reload)
- #
- # If do_reload() is not implemented then leave this commented out
- # and leave 'force-reload' as an alias for 'restart'.
- #
- #log_daemon_msg "Reloading $DESC" "$NAME"
- #do_reload
- #log_end_msg $?
- #;;
- restart|force-reload)
+ restart)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
@@ -188,8 +165,7 @@ case "$1" in
esac
;;
*)
- #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
- echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart}" >&2
exit 3
;;
esac
Binary file not shown.

0 comments on commit 6dc9650

Please sign in to comment.