[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: 2ad99d3b9381a61e112207c79ac89cdf4ebc6c3c Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com> Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
|
||||
+10
@@ -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
|
||||
Reference in New Issue
Block a user