-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrunfod.sh
More file actions
executable file
·36 lines (27 loc) · 844 Bytes
/
runfod.sh
File metadata and controls
executable file
·36 lines (27 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
#!/bin/sh
if [ -f "./runfod.conf" ]; then
. "./runfod.conf"
fi
#
if [ -n "$ifc_setup__name" ]; then
echo "$0: setting ip address of $ifc_setup__name to $ifc_setup__ip_addr_and_subnetmask" 1>&2
if [ "$ifc_setup__wait_for_ifc__in_runfod" = 1 ]; then
while ! ifconfig "$ifc_setup__name" 1>&2; do
echo "$0: interface $ifc_setup__name not available yet, waiting" 1>&2
sleep 1
done
fi
ifconfig "$ifc_setup__name" "$ifc_setup__ip_addr_and_subnetmask"
fi
#
if [ "$FOD_RUNMODE" = "via_systemd" ]; then
echo "$0: using runmode via_systemd, nothing todo" 1>&2
exec ./systemd/fod-systemd-status.sh
elif [ "$FOD_RUNMODE" = "via_supervisord" ]; then
echo "$0: using runmode via_supervisord" 1>&2
exec ./runfod-supervisord.sh "$@"
else
echo "$0: using runmod fg" 1>&2
exec ./runfod-fg.sh "$@"
fi