fix: stop/start dwc service when updating

This commit is contained in:
th33xitus
2020-09-14 22:54:01 +02:00
parent a2201ab3f7
commit 64b6d6b26a
2 changed files with 14 additions and 2 deletions

View File

@@ -52,6 +52,18 @@ restart_klipper(){
fi fi
} }
start_dwc(){
status_msg "Starting DWC-for-Klipper-Socket Service ..."
sudo systemctl start dwc
ok_msg "DWC-for-Klipper-Socket Service started!"
}
stop_dwc(){
status_msg "Stopping DWC-for-Klipper-Socket Service ..."
sudo systemctl stop dwc
ok_msg "DWC-for-Klipper-Socket Service stopped!"
}
start_moonraker(){ start_moonraker(){
if [ -e /etc/init.d/moonraker ]; then if [ -e /etc/init.d/moonraker ]; then
status_msg "Starting Moonraker Service ..." status_msg "Starting Moonraker Service ..."

View File

@@ -33,14 +33,14 @@ update_klipper(){
} }
update_dwc2fk(){ update_dwc2fk(){
stop_klipper stop_dwc
bb4u "dwc2" bb4u "dwc2"
if [ ! -d $DWC2FK_DIR ]; then if [ ! -d $DWC2FK_DIR ]; then
cd ${HOME} && git clone $DWC2FK_REPO cd ${HOME} && git clone $DWC2FK_REPO
else else
cd $DWC2FK_DIR && git pull cd $DWC2FK_DIR && git pull
fi fi
start_klipper start_dwc
} }
update_dwc2(){ update_dwc2(){