You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
699 B
31 lines
699 B
2 years ago
|
#!/sbin/openrc-run
|
||
|
|
||
|
name=$RC_SVCNAME
|
||
|
description="OpenNebula Cloud Scheduler Daemon"
|
||
|
command="/usr/bin/mm_sched"
|
||
2 years ago
|
command_user="oneadmin:cloud"
|
||
2 years ago
|
pidfile="/run/one/${RC_SVCNAME}.pid"
|
||
|
supervisor="supervise-daemon"
|
||
|
|
||
|
depend() {
|
||
2 years ago
|
need opennebula
|
||
|
after syslog networking netmount
|
||
2 years ago
|
}
|
||
|
|
||
|
start() {
|
||
2 years ago
|
ebegin "Starting $RC_SVCNAME"
|
||
|
start-stop-daemon --background \
|
||
|
--exec $command \
|
||
|
--make-pidfile --pidfile $pidfile --user $command_user \
|
||
|
--start
|
||
|
eend $?
|
||
2 years ago
|
}
|
||
|
|
||
|
stop() {
|
||
2 years ago
|
ebegin "Stopping $RC_SVCNAME"
|
||
|
start-stop-daemon --stop \
|
||
|
--exec $command \
|
||
|
--pidfile $pidfile --user $command_user
|
||
|
eend $?
|
||
2 years ago
|
}
|