File tree 1 file changed +4
-2
lines changed
recipes-support/arduino-ootb/arduino-ootb
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1
1
[Unit]
2
2
Description =Start offline update
3
3
ConditionPathExists =/var/sota/offline-updates
4
+ Conflicts =connection-status-led.timer connection-status-led.service m4-led-forwarder.service
4
5
5
6
[Service]
6
7
Type =oneshot
7
- SuccessExitStatus =0 100 101
8
- ExecStart =/usr/bin/aklite-offline install --log-level =0 --src-dir /var/sota/offline-updates/
8
+ ExecStartPre =/bin/sh -c 'echo heartbeat > /sys/class/leds/ledG/trigger; echo none > /sys/class/leds/ledR/trigger'
9
+ 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'
10
+ 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'
9
11
ExecStartPost =/bin/sh -c 'touch /var/sota/offline-update-pending; shutdown -r 1'
You can’t perform that action at this time.
0 commit comments