-
Notifications
You must be signed in to change notification settings - Fork 9
/
Restart.sh
30 lines (30 loc) · 1.18 KB
/
Restart.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
#!/bin/bash
#How to call this script: ./Restart.sh <screen name>
/usr/bin/screen -S $1 -X stuff "^M"
/usr/bin/screen -S $1 -X stuff "broadcast Daily restart in 10 minutes.^M"
sleep 300
/usr/bin/screen -S $1 -X stuff "broadcast Daily restart in 5 minutes.^M"
sleep 120
/usr/bin/screen -S $1 -X stuff "broadcast Daily restart in 3 minutes.^M"
sleep 120
/usr/bin/screen -S $1 -X stuff "broadcast Daily restart in 1 minute.^M"
sleep 10
/usr/bin/screen -S $1 -X stuff "broadcast Daily restart in 50 secunds.^M"
sleep 10
/usr/bin/screen -S $1 -X stuff "broadcast Daily restart in 40 secunds.^M"
sleep 10
/usr/bin/screen -S $1 -X stuff "broadcast Daily restart in 30 secunds.^M"
sleep 10
/usr/bin/screen -S $1 -X stuff "broadcast Daily restart in 20 secunds.^M"
sleep 10
/usr/bin/screen -S $1 -X stuff "broadcast Daily restart in 10 secunds.^M"
sleep 5
/usr/bin/screen -S $1 -X stuff "broadcast Daily restart in 5 secunds.^M"
sleep 2
/usr/bin/screen -S $1 -X stuff "broadcast Daily restart in 3 secunds.^M"
sleep 1
/usr/bin/screen -S $1 -X stuff "broadcast Daily restart in 2 secunds.^M"
sleep 1
/usr/bin/screen -S $1 -X stuff "broadcast Daily restart in 1 secund.^M"
sleep 1
/usr/bin/screen -S $1 -X stuff "stop^M"