app-crypt/moolticute: improve ebuild with init and udev rules

This commit is contained in:
nemunaire 2017-08-11 11:15:14 +02:00
commit b3a9eb5c57
5 changed files with 65 additions and 21 deletions

View file

@ -0,0 +1,28 @@
#!/sbin/openrc-run
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
command=/usr/sbin/moolticuted
command_args=""
pidfile=/var/run/knot/knot.pid
extra_started_commands="reload"
description_reload="Reload configuration and changed zones."
depend() {
need local udev
}
start() {
checkpath -d -m 0750 -o knot:knot /var/run/knot/ /var/lib/knot/
ebegin "Starting moolticuted"
start-stop-daemon --start --background \
--make-pidfile --pidfile $pidfile --exec $command -- $command_args
eend $?
}
stop() {
ebegin "Stoping moolticuted"
start-stop-daemon --stop --pidfile $pidfile
ewend $?
}