forked from CryptoLions/BP-Position-Telegram-Notifier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstop.sh
executable file
·32 lines (26 loc) · 798 Bytes
/
stop.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
31
#!/bin/bash
################################################################################
#
# EOS BP Position Monitor
# Daemon that sends pm in telegram using bot functionality on changing position
#
# Created by http://CryptoLions.io
#
# Git Hub: https://github.com/CryptoLions/BP-Position-Telegram-Notifier
# Eos Network Monitor: http://eosnetworkmonitor.io/
#
###############################################################################
DIR="./"
if [ -f $DIR"/placeChecker.pid" ]; then
pid=`cat $DIR"/placeChecker.pid"`
echo $pid
kill $pid
rm -r $DIR"/placeChecker.pid"
echo -ne "Stoping Daemon"
while true; do
[ ! -d "/proc/$pid/fd" ] && break
echo -ne "."
sleep 1
done
echo -ne "\rDaemon Stopped. \n"
fi