mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-25 20:58:37 -06:00
avoid concurrent processes
This commit is contained in:
parent
6465b5e9a6
commit
19503ef85e
1 changed files with 4 additions and 1 deletions
|
@ -19,7 +19,10 @@
|
|||
# it might also be a good idea to add '<location-of-this-script> scheduler' to your DE's autostart list, or to '.profile' so that it launches on system login
|
||||
# (sometimes I forget to turn on the monitor when I start my PC, so this is better than having a crontab)
|
||||
|
||||
# location of the config file
|
||||
# avoid running two concurrent processes
|
||||
[ "${BRTNESSLOCKER}" != "running" ] && exec env BRTNESSLOCKER="running" flock -en "/tmp/brightness-by-daylight" "$0" "$@" || :
|
||||
|
||||
# set location of the config file
|
||||
[ -z "$XDG_CONFIG_HOME" ] && confdir="/home/sintan/.config" || confdir="$XDG_CONFIG_HOME"
|
||||
|
||||
# read from the config file
|
||||
|
|
Loading…
Reference in a new issue