Skip to content
Snippets Groups Projects
Commit 5b1aa1c9 authored by Antoine Prieels's avatar Antoine Prieels
Browse files

[FIX] point_of_sale: Stop led_status.sh on update


The fact that led_status.sh was still running when performing the
`git reset --hard` made it impossible to remount the filesystem in RO
mode, due to a `mount point is busy` error.

Instead of starting the led_status_sh script from rc.local, we make it
a service so it can be easily restarted when an update is performed.

closes odoo/odoo#54353

X-original-commit: 2ad99d3b
Signed-off-by: default avatarQuentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: default avatarAntoine Prieëls <aprieels@users.noreply.github.com>
parent 930db42b
No related branches found
No related tags found
No related merge requests found
......@@ -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) &
......@@ -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
......@@ -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
......
[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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment