diff options
Diffstat (limited to 'app-emulation/lxd/files/lxd-0.18.initd')
-rw-r--r-- | app-emulation/lxd/files/lxd-0.18.initd | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/app-emulation/lxd/files/lxd-0.18.initd b/app-emulation/lxd/files/lxd-0.18.initd new file mode 100644 index 0000000000..2b75e51c8a --- /dev/null +++ b/app-emulation/lxd/files/lxd-0.18.initd @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +DAEMON=/usr/sbin/lxd +PIDFILE=/run/lxd.pid + +depend() { + need cgmanager + need net +} + +start() { + ebegin "Starting lxd server" + + start-stop-daemon --start \ + --pidfile ${PIDFILE} \ + --exec ${DAEMON} \ + --background \ + --make-pidfile \ + -- \ + ${LXD_OPTIONS} + + eend $? +} + +stop() { + ebegin "Stopping lxd server" + start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE} + eend $? +} |