mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-20 10:50:08 +03:00
M #-: Add supervisord services fireedge, guacd (#389)
Signed-off-by: Petr Ospalý <pospaly@opennebula.io>
This commit is contained in:
parent
e877de5dc4
commit
fa22e988b0
@ -0,0 +1,11 @@
|
||||
[program:opennebula-fireedge]
|
||||
command=/usr/share/one/supervisord/service/opennebula-fireedge.sh
|
||||
user=oneadmin
|
||||
directory=/var/lib/one
|
||||
priority=310
|
||||
autorestart=true
|
||||
startsecs=5
|
||||
stopasgroup=true
|
||||
killasgroup=true
|
||||
redirect_stderr=true
|
||||
|
@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# give up after two minutes
|
||||
TIMEOUT=120
|
||||
|
||||
#
|
||||
# functions
|
||||
#
|
||||
|
||||
. /usr/share/one/supervisord/service/lib/functions.sh
|
||||
|
||||
#
|
||||
# run service
|
||||
#
|
||||
|
||||
if [ -f /var/lib/one/.one/sunstone_auth ] ; then
|
||||
msg "Found sunstone_auth - we can start service"
|
||||
else
|
||||
msg "No sunstone_auth - wait for oned to create it..."
|
||||
if ! wait_for_file /var/lib/one/.one/sunstone_auth ; then
|
||||
err "Timeout!"
|
||||
exit 1
|
||||
fi
|
||||
msg "File created - continue"
|
||||
fi
|
||||
|
||||
msg "Service started!"
|
||||
exec /usr/bin/node /usr/lib/one/fireedge/dist/index.js
|
@ -0,0 +1,11 @@
|
||||
[program:opennebula-guacd]
|
||||
command=/usr/share/one/supervisord/service/opennebula-guacd.sh
|
||||
user=oneadmin
|
||||
directory=/var/lib/one
|
||||
priority=310
|
||||
autorestart=true
|
||||
startsecs=5
|
||||
stopasgroup=true
|
||||
killasgroup=true
|
||||
redirect_stderr=true
|
||||
|
@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# give up after two minutes
|
||||
TIMEOUT=120
|
||||
|
||||
#
|
||||
# functions
|
||||
#
|
||||
|
||||
. /usr/share/one/supervisord/service/lib/functions.sh
|
||||
|
||||
#
|
||||
# run service
|
||||
#
|
||||
|
||||
#TODO: should I wait for sunstone or something?
|
||||
|
||||
for envfile in \
|
||||
/etc/one/guacd \
|
||||
;
|
||||
do
|
||||
if [ -f "$envfile" ] ; then
|
||||
. "$envfile"
|
||||
fi
|
||||
done
|
||||
|
||||
msg "Service started!"
|
||||
exec /usr/share/one/guacd/sbin/guacd -f $OPTS
|
Loading…
x
Reference in New Issue
Block a user