mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
Fixed check for already running
This commit is contained in:
parent
a57f02f6a6
commit
1530d76019
@ -2,8 +2,8 @@
|
||||
|
||||
# Refresh clock at exactly 00 seconds
|
||||
refresh(){
|
||||
SCRIPT_NAME=`basename "$0"`
|
||||
pidof -x $SCRIPT_NAME && exit 1 # exit if already running
|
||||
PID=$(pidof -x `basename "$0"`)
|
||||
[ "$PID" = "$BASHPID" ] || exit 1 # exit if already running
|
||||
sleep $((60-$(date "+%S")))
|
||||
kill -35 $(pidof dwmblocks)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user