aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorStefan Dej <meteyou@gmail.com>2023-01-08 22:06:55 +0100
committerKevinOConnor <kevin@koconnor.net>2023-01-17 18:17:25 -0500
commitcf25c3907cfe60e5bc7b86ce80505a493568d728 (patch)
treef9c9ddf746750ac584701ae92baeac9d58466a6b /scripts
parent5502be01f76918b7d8f2061070b21994be8acdd9 (diff)
downloadkutter-cf25c3907cfe60e5bc7b86ce80505a493568d728.tar.gz
kutter-cf25c3907cfe60e5bc7b86ce80505a493568d728.tar.xz
kutter-cf25c3907cfe60e5bc7b86ce80505a493568d728.zip
scripts: remove initd klipper-mcu-start.sh
Signed-off-by: Stefan Dej <meteyou@gmail.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/klipper-mcu-start.sh78
1 files changed, 0 insertions, 78 deletions
diff --git a/scripts/klipper-mcu-start.sh b/scripts/klipper-mcu-start.sh
deleted file mode 100755
index f58a6298..00000000
--- a/scripts/klipper-mcu-start.sh
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/bin/sh
-# System startup script to start the MCU Linux firmware
-
-### BEGIN INIT INFO
-# Provides: klipper_mcu
-# Required-Start: $local_fs
-# Required-Stop:
-# Default-Start: 3 4 5
-# Default-Stop: 0 1 2 6
-# Short-Description: Klipper_MCU daemon
-# Description: Starts the MCU for Klipper.
-### END INIT INFO
-
-PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
-DESC="klipper_mcu startup"
-NAME="klipper_mcu"
-KLIPPER_HOST_MCU=/usr/local/bin/klipper_mcu
-KLIPPER_HOST_ARGS="-r"
-PIDFILE=/var/run/klipper_mcu.pid
-
-. /lib/lsb/init-functions
-
-mcu_host_stop()
-{
- # Shutdown existing Klipper instance (if applicable). The goal is to
- # put the GPIO pins in a safe state.
- if [ -c /tmp/klipper_host_mcu ]; then
- log_daemon_msg "Attempting to shutdown host mcu..."
- set -e
- ( echo "FORCE_SHUTDOWN" > /tmp/klipper_host_mcu ) 2> /dev/null || ( log_action_msg "Firmware busy! Please shutdown Klipper and then retry." && exit 1 )
- sleep 1
- ( echo "FORCE_SHUTDOWN" > /tmp/klipper_host_mcu ) 2> /dev/null || ( log_action_msg "Firmware busy! Please shutdown Klipper and then retry." && exit 1 )
- sleep 1
- set +e
- fi
-
- log_daemon_msg "Stopping klipper host mcu" $NAME
- killproc -p $PIDFILE $KLIPPER_HOST_MCU
-}
-
-mcu_host_start()
-{
- [ -x $KLIPPER_HOST_MCU ] || return
-
- if [ -c /tmp/klipper_host_mcu ]; then
- mcu_host_stop
- fi
-
- log_daemon_msg "Starting klipper MCU" $NAME
- start-stop-daemon --start --quiet --exec $KLIPPER_HOST_MCU \
- --background --pidfile $PIDFILE --make-pidfile \
- -- $KLIPPER_HOST_ARGS
- log_end_msg $?
-}
-
-case "$1" in
-start)
- mcu_host_start
- ;;
-stop)
- mcu_host_stop
- ;;
-restart)
- $0 stop
- $0 start
- ;;
-reload|force-reload)
- log_daemon_msg "Reloading configuration not supported" $NAME
- log_end_msg 1
- ;;
-status)
- status_of_proc -p $PIDFILE $KLIPPER_HOST_MCU $NAME && exit 0 || exit $?
- ;;
-*) log_action_msg "Usage: /etc/init.d/klipper_mcu {start|stop|status|restart|reload|force-reload}"
- exit 2
- ;;
-esac
-exit 0