-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrc.local
21 lines (15 loc) · 1004 Bytes
/
rc.local
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/sbin/pfctl -t bruteforce -T expire 86400
su -l _postgresql -c '/usr/local/bin/pg_ctl start -D /home/postgresql/data/'
until /usr/local/bin/pg_isready -h 127.0.0.1
do
echo "Waiting for postgresql to start ..."
sleep 1
done
dir="/home/datasetu-auth-server"
$dir/run.tmux
$dir/run.bot.tmux
$dir/run.crl.tmux
telegram_apikey=`grep TELEGRAM_APIKEY $dir/config-prod.js | grep -o "\".*\"," | tr -d '",'`
telegram_chat_id=`grep TELEGRAM_CHAT_ID $dir/config-prod.js | grep -o "\".*\"," | tr -d '",'`
hostname=`hostname`
/usr/local/bin/curl "https://api.telegram.org/bot$telegram_apikey/sendMessage?chat_id=$telegram_chat_id&text=[AUTH] : booting..."