#!/sbin/runscript # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ depend() { after mysql } start() { ebegin "Starting OpenNebula daemon" start-stop-daemon \ --start \ --exec /usr/bin/oned \ --user ${USER}:${GROUP} \ -- ${ONED_OPTIONS} eend $? ebegin "Starting OpenNebula scheduler" start-stop-daemon \ --start \ --exec /usr/bin/mm_sched \ --pidfile "${SCHED_PIDFILE}" \ --make-pidfile \ --background \ --user ${USER}:${GROUP} \ -- ${SCHED_OPTIONS} eend $? } stop() { ebegin "Stopping OpenNebula daemon" start-stop-daemon \ --stop \ --exec /usr/bin/oned eend $? ebegin "Stopping OpenNebula scheduler" start-stop-daemon \ --stop \ --exec /usr/bin/mm_sched \ --pidfile "${SCHED_PIDFILE}" eend $? }