#!/sbin/runscript # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ # # Author: Cor Cornelisse 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() { checkconfig || return $? . /etc/conf.d/${SVCNAME} ebegin "Starting ${SVCNAME}" start-stop-daemon --start --quiet --make-pidfile --pidfile \ "/var/run/${SVCNAME}.pid" --background \ --stdout ${LOG_PATH}/${SVCNAME}.log \ --stderr ${LOG_PATH}/${SVCNAME}.err --exec \ /opt/noVNC/utils/nova-novncproxy -- \ --config-file=${CONFIG_FILE} --cert=${CERT_FILE} \ --web ${WEB_ROOT} eend $? "Failed to start ${SVCNAME}" } stop() { checkconfig || return $? . /etc/conf.d/${SVCNAME} ebegin "Stopping ${SVCNAME}" start-stop-daemon --stop --pidfile "/var/run/${SVCNAME}.pid" \ --exec /opt/noVNC/utils/nova-novncproxy eend $? "Failed to stop ${SVCNAME}" }