-
Notifications
You must be signed in to change notification settings - Fork 1
/
scwebrun.sh
41 lines (33 loc) · 1.05 KB
/
scwebrun.sh
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
36
37
38
39
40
#!/bin/sh
cd /usr/share/scweb/
python3 systemcontroller.py >/dev/null 2>&1 &
COUNT=25
IP=`/sbin/ifconfig eth0 | grep 'inet addr' | awk '{print $2}' | awk -F ':' '{print $2}'`
while [ "$IP" == "" -a "$COUNT" != "0" ]; do
echo -n "." >/dev/ttyPS0
sleep 1
COUNT=`expr $COUNT - 1`
IP=`/sbin/ifconfig eth0 | grep 'inet addr' | awk '{print $2}' | awk -F ':' '{print $2}'`
done
echo >/dev/ttyPS0
if [ "$IP" != "" ]; then
cat >/dev/ttyPS0 <<- EOM
****************************************
* *
* BEAM Tool Web Address *
* *
* http://$IP:50002 *
* *
****************************************
EOM
else
cat >/dev/ttyPS0 <<- EOM
****************************************
* *
* BEAM Tool Web Address *
* *
* No IP address is assigned *
* *
****************************************
EOM
fi