-
Notifications
You must be signed in to change notification settings - Fork 0
/
cronjobs-monitor.sh
24 lines (24 loc) · 1.04 KB
/
cronjobs-monitor.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
#/home/csgoserver/csgoserver monitor > /dev/null 2>&1
#
#
#
if [ ! -d "webserver" ]; then
mkdir webserver
fi
if [ ! -d "webserver/logs" ]; then
mkdir webserver/logs
fi
if [ ! -f "webserver/logs/monitor.log" ]; then
echo "Log Created at `date`" > webserver/logs/monitor.log
fi
echo "-----------------------------------------" >> webserver/logs/monitor.log
echo "-----------------------------------------" >> webserver/logs/monitor.log
echo "-----------------------------------------" >> webserver/logs/monitor.log
echo "cronjobs-monitor started at `date`" >> webserver/logs/monitor.log
./csgoserver monitor >> webserver/logs/monitor.log
./csgoserver-2 monitor >> webserver/logs/monitor.log
./csgoserver-3 monitor >> webserver/logs/monitor.log
echo "cronjobs-monitor finished at `date`" >> webserver/logs/monitor.log
echo "-----------------------------------------" >> webserver/logs/monitor.log
echo "-----------------------------------------" >> webserver/logs/monitor.log
echo "-----------------------------------------" >> webserver/logs/monitor.log