diff options
Diffstat (limited to 'www-apps/novnc/files/noVNC.initd')
-rw-r--r-- | www-apps/novnc/files/noVNC.initd | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/www-apps/novnc/files/noVNC.initd b/www-apps/novnc/files/noVNC.initd new file mode 100644 index 000000000000..37367c93c2d5 --- /dev/null +++ b/www-apps/novnc/files/noVNC.initd @@ -0,0 +1,30 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ +# +# Author: Cor Cornelisse <corcornelisse@gmail.com> + +pidfile="/var/run/${SVCNAME}.pid" +command="/usr/bin/nova-novncproxy" +command_args="--flagfile=${FLAG_FILE} --cert=${CERT_FILE} --web ${WEB_ROOT}" +command_background="yes" +start_stop_daemon_args="--stdout ${LOG_PATH}/${SVCNAME}.log --stderr ${LOG_PATH}/${SVCNAME}.err" + + +depend() { + need net +} + +checkconfig() { + if [ ! -r /etc/conf.d/${SVCNAME} ]; then + eerror "No config file found: /etc/conf.d/${SVCNAME}" + return 1 + fi + return 0 +} + + +start_pre() { + checkconfig || return $? +} |