Skip to content

Commit

Permalink
More robust implementation in offline-update.service
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxPayne86 committed Jan 9, 2025
1 parent 89f75e4 commit 10ed31d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ Conflicts=connection-status-led.timer connection-status-led.service m4-led-forwa
[Service]
Type=oneshot
ExecStartPre=/bin/sh -c 'echo heartbeat > /sys/class/leds/ledG/trigger; echo none > /sys/class/leds/ledR/trigger'
ExecStart=/bin/sh -c '/usr/bin/aklite-offline install --log-level=0 --src-dir /var/sota/offline-updates/; RET=$?; if [ $RET -eq 0 ] || [ $RET -eq 100 ] || [ $RET -eq 101 ]; then touch /var/run/offline-update-success; else rm -f /var/run/offline-update-success; fi'
ExecStart=/bin/sh -c '/usr/bin/aklite-offline install --log-level=0 --src-dir /var/sota/offline-updates/; RET=$?; if [ $RET -eq 0 ] || [ $RET -eq 100 ] || [ $RET -eq 101 ]; then touch /var/run/offline-update-success; else rm -f /var/run/offline-update-success; fi; exit 0'
ExecStartPost=/bin/sh -c 'if [ -f /var/run/offline-update-success ]; then echo default-on > /sys/class/leds/ledG/trigger; echo none > /sys/class/leds/ledR/trigger; else echo none > /sys/class/leds/ledG/trigger; echo default-on > /sys/class/leds/ledR/trigger; fi'
ExecStartPost=/bin/sh -c 'touch /var/sota/offline-update-pending; shutdown -r 1'
ExecStartPost=/bin/sh -c 'if [ -f /var/run/offline-update-success ]; then touch /var/sota/offline-update-pending && shutdown -r 1; fi;'

0 comments on commit 10ed31d

Please sign in to comment.