-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit
33 lines (23 loc) · 997 Bytes
/
init
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
#!/bin/bash
export DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket dbus-send --system --print-reply --dest=org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager.StartUnit string:"plymouth-quit.service" string:"replace"
echo "Wait for X11..."
pkill node
service snmpd stop
sleep 1
if [[ -z "$CONF_IP" ]] || [[ -z "$CONF_GATEWAY" ]]; then
echo "Please set CONF_IP and CONF_GATEWAY to set static IP"
else
: ${CONF_DNS1:=8.8.8.8}
: ${CONF_DNS2:=8.8.4.4}
: ${CONF_IFACE:=eth0}
python2 updateconnection.py $CONF_IP 24 $CONF_GATEWAY $CONF_DNS1 $CONF_DNS2 $CONF_IFACE > networkconfig.log
/usr/sbin/snmpd $CONF_IP
fi
#python2 updateconnection.py CONF_IP 24 CONF_GATEWAY CONF_DNS1 CONF_DNS2 CONF_IFACE
while [ ! -e /tmp/.X11-unix/X${DISPLAY#*:} ]; do sleep 0.5; done
while true; do
npm run start
echo "restart ... "
sleep 60
done