1
0
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:
Petr Ospalý 2020-11-06 11:43:18 +01:00 committed by GitHub
parent e877de5dc4
commit fa22e988b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 82 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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