feat: service control
adds a small script which will always start/stop/restart simulavr together with klipper restarting klipper often resulted in a failed mcu reset error, this is an attempt to fix that
This commit is contained in:
parent
859f3968e4
commit
5275832638
|
|
@ -46,6 +46,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
### copy all required files
|
||||
COPY simulavr.config /usr/src
|
||||
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
||||
COPY service_control.sh /bin/service_control
|
||||
COPY start.sh /bin/start
|
||||
|
||||
### make entrypoint executable
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$2" = "klipper" ]; then
|
||||
sudo /usr/bin/supervisorctl "$1" simulavr "$2"
|
||||
else
|
||||
sudo /usr/bin/supervisorctl "$1" "$2"
|
||||
fi
|
||||
|
|
@ -79,7 +79,7 @@ setup_simulavr
|
|||
build_simulavr
|
||||
|
||||
sudo -S rm /bin/systemctl
|
||||
sudo -S ln -s /usr/bin/supervisorctl /bin/systemctl
|
||||
sudo -S ln -s /bin/service_control /bin/systemctl
|
||||
|
||||
cd ~ && echo "Everything is ready ... Starting ..."
|
||||
/usr/bin/supervisord
|
||||
Loading…
Reference in New Issue