mirror of
https://github.com/srlabs/blue-merle.git
synced 2024-12-22 13:55:00 -05:00
switch: do not run the lock contention check in the background
It actually prevents out main script from running because the flock process is still running in the background.
This commit is contained in:
parent
8053d44ce7
commit
0fa4d89602
@ -10,7 +10,7 @@ logger -p notice -t blue-merle-toggle "Called... ${action}"
|
|||||||
if [ "$action" = "on" ];then
|
if [ "$action" = "on" ];then
|
||||||
mcu_send_message "Blue Merle ${action}"
|
mcu_send_message "Blue Merle ${action}"
|
||||||
echo "on" > /tmp/sim_change_switch
|
echo "on" > /tmp/sim_change_switch
|
||||||
flock -n /tmp/blue-merle-switch.lock logger -p notice -t blue-merle-toggle "Running Stage 1" || logger -p notice -t blue-merle-toggle "Lockfile busy" &
|
flock -n /tmp/blue-merle-switch.lock logger -p notice -t blue-merle-toggle "Running Stage 1" || logger -p notice -t blue-merle-toggle "Lockfile busy"
|
||||||
flock -n /tmp/blue-merle-switch.lock timeout 90 /usr/bin/blue-merle-switch-stage1
|
flock -n /tmp/blue-merle-switch.lock timeout 90 /usr/bin/blue-merle-switch-stage1
|
||||||
|
|
||||||
elif [ "$action" = "off" ];then
|
elif [ "$action" = "off" ];then
|
||||||
|
Loading…
Reference in New Issue
Block a user