fuss-fucc / clientScripts / clientScript @ e2ac9a14
1 | e2ac9a14 | Paolo Dongilli | #!/bin/bash
|
---|---|---|---|
2 | |||
3 | myNic="$(ls /sys/class/net/ -1 | grep -v lo | grep -v wlan)" |
||
4 | |||
5 | if [ -e /root/reboot ];then |
||
6 | rm /root/reboot |
||
7 | touch /root/join
|
||
8 | shutdown -r now
|
||
9 | fi
|
||
10 | |||
11 | if [ -e /root/join ];then |
||
12 | dhclient $myNic |
||
13 | screen -d -m -S XY |
||
14 | screen -S XY -X stuff "fuss-client -av && rm /root/join ; reboot\n" |
||
15 | else
|
||
16 | rm /etc/rc.local |
||
17 | rm /root/clientScript
|
||
18 | rm -fr /root/.ssh |
||
19 | |||
20 | fi
|
||
21 | |||
22 | |||
23 | |||
24 |