Closed MaStr closed 6 years ago
Should be able to do this in the systemd unit:
[Unit]
Description=PirateBox timesave service
[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/opt/piratebox/bin/timesave.sh /opt/piratebox/conf/piratebox.conf recover
ExecStop=/opt/piratebox/bin/timesave.sh /opt/piratebox/conf/piratebox.conf save
TimeoutSec=20
[Install]
WantedBy=multi-user.target
If Pi is rebooted, the timesave function should store the time with a shutdown service. New service file needed which is exectued by shutdown dependency