X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-dev.git/blobdiff_plain/c81a9160bc47b724cba617285da6fec429734a21..046e50706c20fe18f380eb37eb72836a9f051450:/debian/invirt-dev.init diff --git a/debian/invirt-dev.init b/debian/invirt-dev.init index 160aabd..a5bc89a 100755 --- a/debian/invirt-dev.init +++ b/debian/invirt-dev.init @@ -16,19 +16,29 @@ NAME=invirt-dev GEN_FILES=/srv/repository/conf/distributions +. /lib/init/std-init.sh . /lib/init/gen-files.sh -case "$1" in - start|reload|force-reload|restart) - log_begin_msg "Reloading config for $PACKAGE" - gen_files - reprepro-env export - invirt-build-conf - log_end_msg $? - ;; - stop) - ;; - *) - log_success_msg "Usage: /etc/init.d/$NAME {start|reload|force-reload|restart|stop}" - ;; -esac +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + ret=0 + gen_files || ret=2 + reprepro-env export || ret=2 + invirt-build-conf || ret=2 + + return $ret +} + +do_stop() +{ + : +} + +do_reload() +{ + do_start +}