-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·52 lines (40 loc) · 1.49 KB
/
run.sh
File metadata and controls
executable file
·52 lines (40 loc) · 1.49 KB
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
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
VERSION=1.8.0
NOW=$(TZ="Europe/Brussels" date +"%d-%m-%y %T")
/opt/java/bin/java -classpath pi-${VERSION}.jar be.uitpas.pi.FileSystemCheckClient > /tmp/cid.log 2>&1 &
/opt/java/bin/java -Dcom.sun.management.jmxremote.port=1234 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dsun.security.smartcardio.library=/usr/lib/arm-linux-gnueabihf/libpcsclite.so.1 -jar pi-${VERSION}.jar > /tmp/cid.log 2>&1 &
# clean the screen
clear
#inform the user
echo " "
echo " starting the CID APP"
echo " Please wait"
echo " een ogenblik geduld AUB"
echo -n " Version: "
echo ${VERSION}
echo -n " Cable IP:"
ifconfig eth0 | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'
if ifconfig -a | grep -iq wlan0
then
echo " wifi found"
ESSID=$(iwconfig wlan0 | head -n1 | cut -d " " -f 9)
if iwconfig wlan0 | grep -iq off
then
echo -n " "
echo ${ESSID}
echo -n " WIFI IP:"
ifconfig wlan0 | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'
else
echo " WIFI NOT CONNECTED"
fi
else
echo " no wifi card"
fi
if [ -f /dev/wlan0 ];
then
echo -n" wifi IP:"
ifconfig wlan0 | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'
fi
echo -n " TIME:"
echo ${NOW}
sleep 60