# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Koha ILS"
-NAME=daemonexecutablename
-DAEMON=/usr/sbin/$NAME
-DAEMON_ARGS="--options args"
-PIDFILE=/var/run/$NAME.pid
+NAME="koha-common"
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ -x /usr/sbin/koha-start-zebra ] || exit 0
# Read configuration variable file if it is present
-# [ -r /etc/default/$NAME ] && . /etc/default/$NAME
+if [ -r /etc/default/$NAME ]; then
+ # Debian / Ubuntu
+ . /etc/default/$NAME
+elif [ -r /etc/sysconfig/$NAME ]; then
+ # RedHat / SuSE
+ . /etc/sysconfig/$NAME
+fi
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
*) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
-# status)
-# 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)
#
# If the "reload" option is implemented then remove the
;;
esac
;;
+# TODO: Implement this. It should check every daemon is running
+# status)
+# status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+# ;;
*)
- 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|restart|force-reload|status}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 3
;;
esac