File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6363 LockPersonality = true ;
6464 } ;
6565 } ;
66+
67+ systemd . services . spark-sidecar-restart = {
68+ description = "Scheduled restart for Spark Lightning L2 sidecar" ;
69+
70+ unitConfig = {
71+ ConditionPathExists = "/var/lib/lnbits/.configured" ;
72+ } ;
73+
74+ serviceConfig = {
75+ Type = "oneshot" ;
76+ ExecCondition = "${ pkgs . bash } /bin/bash -c 'test ! -f ${ selectedFundingSourceFile } || ${ pkgs . gnugrep } /bin/grep -qx spark ${ selectedFundingSourceFile } '" ;
77+ ExecStart = "${ pkgs . systemd } /bin/systemctl try-restart spark-sidecar.service" ;
78+ } ;
79+ } ;
80+
81+ systemd . timers . spark-sidecar-restart = {
82+ description = "Restart Spark Lightning L2 sidecar at 07:00 and 19:00 daily" ;
83+ wantedBy = [ "timers.target" ] ;
84+ timerConfig = {
85+ OnCalendar = [ "*-*-* 07:00:00" "*-*-* 19:00:00" ] ;
86+ Persistent = true ;
87+ Unit = "spark-sidecar-restart.service" ;
88+ } ;
89+ } ;
6690}
You can’t perform that action at this time.
0 commit comments