mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-11-19 18:37:41 +01:00
fixing background service
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
# This script runs on after start in background
|
# This script runs on after start in background
|
||||||
# as a service and gets restarted on failure
|
# as a service and gets restarted on failure
|
||||||
# it runs ALMOST every seconds
|
# it runs ALMOST every seconds
|
||||||
|
# DEBUG: sudo journalctl -f -u background
|
||||||
|
|
||||||
# INFOFILE - state data from bootstrap
|
# INFOFILE - state data from bootstrap
|
||||||
infoFile="/home/admin/raspiblitz.info"
|
infoFile="/home/admin/raspiblitz.info"
|
||||||
@@ -26,7 +27,6 @@ do
|
|||||||
|
|
||||||
# count up
|
# count up
|
||||||
counter=$(($counter+1))
|
counter=$(($counter+1))
|
||||||
echo "counter($counter)"
|
|
||||||
|
|
||||||
####################################################
|
####################################################
|
||||||
# RECHECK DHCP-SERVER
|
# RECHECK DHCP-SERVER
|
||||||
@@ -59,7 +59,7 @@ do
|
|||||||
|
|
||||||
# every 15min - not too often
|
# every 15min - not too often
|
||||||
# because its a ping to external service
|
# because its a ping to external service
|
||||||
recheckPublicIP=$((($counter % 60)+1))
|
recheckPublicIP=$((($counter % 900)+1))
|
||||||
if [ ${recheckPublicIP} -eq 1 ]; then
|
if [ ${recheckPublicIP} -eq 1 ]; then
|
||||||
echo "*** RECHECK PUBLIC IP ***"
|
echo "*** RECHECK PUBLIC IP ***"
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ After=bootstrap.service
|
|||||||
[Service]
|
[Service]
|
||||||
User=root
|
User=root
|
||||||
Group=root
|
Group=root
|
||||||
Type=forking
|
Type=simple
|
||||||
ExecStart=/home/admin/_background.sh
|
ExecStart=/home/admin/_background.sh
|
||||||
KillMode=process
|
KillMode=process
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|||||||
Reference in New Issue
Block a user