mirror of
https://github.com/sjlongland/opennebula-overlay.git
synced 2025-09-13 10:03:16 +10:00
35 lines
569 B
Plaintext
35 lines
569 B
Plaintext
#!/sbin/openrc-run
|
|
|
|
depend() {
|
|
need net
|
|
use opennebula
|
|
}
|
|
|
|
#
|
|
# Function that starts the daemon/service
|
|
#
|
|
start() {
|
|
for d in /var/run/one /var/lock/one /var/log/one /var/lib/one
|
|
do
|
|
if [ ! -d ${d} ]
|
|
then
|
|
ebegin "Creating ${d}"
|
|
mkdir ${d}
|
|
eend $?
|
|
fi
|
|
chown -R oneadmin:oneadmin ${d}
|
|
done
|
|
ebegin "Starting OneFlow Service"
|
|
su oneadmin -s /bin/sh -c "/usr/bin/oneflow-server start"
|
|
eend $?
|
|
}
|
|
|
|
#
|
|
# Function that stops the daemon/service
|
|
#
|
|
stop() {
|
|
ebegin "Stopping OneFlow Service"
|
|
su oneadmin -s /bin/sh -c "/usr/bin/oneflow-server stop"
|
|
eend $?
|
|
}
|