X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-dev.git/blobdiff_plain/501e01a2675fc415344a8b2416d3e1adf1938075..e693fbc9c639083e3003b8de0aff71501afddee2:/debian/invirt-dev.init diff --git a/debian/invirt-dev.init b/debian/invirt-dev.init index 9600d74..160aabd 100755 --- a/debian/invirt-dev.init +++ b/debian/invirt-dev.init @@ -1,25 +1,34 @@ #!/bin/bash +### BEGIN INIT INFO +# Provides: invirt-dev +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Invirt development configuration +# Description: +### END INIT INFO -PACKAGE=invirt-dev +# Author: Invirt project -. /lib/lsb/init-functions +# Do NOT "set -e" -gen_config () { - local keyid="$(invirt-getconf apt.keyid)" - for f in /srv/repository/conf/{distributions,invirt-uploaders}; do - perl -pe "s/\@apt\.keyid\@/$keyid/g" <"$f".in >"$f" - done -} +NAME=invirt-dev +GEN_FILES=/srv/repository/conf/distributions + +. /lib/init/gen-files.sh case "$1" in start|reload|force-reload|restart) log_begin_msg "Reloading config for $PACKAGE" - gen_config + gen_files + reprepro-env export + invirt-build-conf log_end_msg $? ;; stop) ;; *) - log_success_msg "Usage: /etc/init.d/$PACKAGE {start|reload|force-reload|restart|stop}" + log_success_msg "Usage: /etc/init.d/$NAME {start|reload|force-reload|restart|stop}" ;; esac