diff --git a/addons/point_of_sale/tools/posbox/configuration/posbox_update.sh b/addons/point_of_sale/tools/posbox/configuration/posbox_update.sh index 93f1a003f18..2bfb9f3aec2 100755 --- a/addons/point_of_sale/tools/posbox/configuration/posbox_update.sh +++ b/addons/point_of_sale/tools/posbox/configuration/posbox_update.sh @@ -2,6 +2,8 @@ sudo mount -o remount,rw / +sudo service led-status stop + cd /home/pi/odoo localbranch=$(git symbolic-ref -q --short HEAD) localremote=$(git config branch.$localbranch.remote) @@ -25,4 +27,7 @@ done sudo mount -o remount,ro / sudo mount -o remount,rw /root_bypass_ramdisks/etc/cups + +sudo service led-status start + (sleep 5 && sudo service odoo restart) & diff --git a/addons/point_of_sale/tools/posbox/overwrite_after_init/etc/rc.local b/addons/point_of_sale/tools/posbox/overwrite_after_init/etc/rc.local index 4c4739b4aeb..ea965b192d6 100755 --- a/addons/point_of_sale/tools/posbox/overwrite_after_init/etc/rc.local +++ b/addons/point_of_sale/tools/posbox/overwrite_after_init/etc/rc.local @@ -20,7 +20,6 @@ fi mkdir -p /var/run/odoo chown pi:pi /var/run/odoo -/home/pi/odoo/addons/point_of_sale/tools/posbox/configuration/led_status.sh & /home/pi/odoo/addons/point_of_sale/tools/posbox/configuration/wireless_ap.sh & exit 0 diff --git a/addons/point_of_sale/tools/posbox/overwrite_before_init/etc/init_posbox_image.sh b/addons/point_of_sale/tools/posbox/overwrite_before_init/etc/init_posbox_image.sh index 0d0f932da97..5a961b032e5 100755 --- a/addons/point_of_sale/tools/posbox/overwrite_before_init/etc/init_posbox_image.sh +++ b/addons/point_of_sale/tools/posbox/overwrite_before_init/etc/init_posbox_image.sh @@ -150,6 +150,7 @@ update-rc.d -f dnsmasq remove update-rc.d timesyncd defaults systemctl enable ramdisks.service +systemctl enable led-status.service systemctl disable dphys-swapfile.service systemctl enable ssh systemctl set-default graphical.target diff --git a/addons/point_of_sale/tools/posbox/overwrite_before_init/etc/systemd/system/led-status.service b/addons/point_of_sale/tools/posbox/overwrite_before_init/etc/systemd/system/led-status.service new file mode 100644 index 00000000000..24e5637d5d9 --- /dev/null +++ b/addons/point_of_sale/tools/posbox/overwrite_before_init/etc/systemd/system/led-status.service @@ -0,0 +1,10 @@ +[Unit] +Description=Led Status +After=sysinit.target local-fs.target + +[Service] +Type=simple +ExecStart=/home/pi/odoo/addons/point_of_sale/tools/posbox/configuration/led_status.sh + +[Install] +WantedBy=basic.target