From e15a8e3d70e690dec4912c5f40dfa19f50f16278 Mon Sep 17 00:00:00 2001 From: henne49 Date: Wed, 14 Aug 2024 18:04:46 +0200 Subject: [PATCH] Delete uninstall.sh --- uninstall.sh | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 uninstall.sh diff --git a/uninstall.sh b/uninstall.sh deleted file mode 100644 index 465aa16..0000000 --- a/uninstall.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -SERVICE_NAME=$(basename $SCRIPT_DIR) -LOG_DIR=/var/log/$SERVICE_NAME -RC_LOCAL_FILE=/data/rc.local - -#remove the service -if [ -f /service/$SERVICE_NAME ]; then - rm /service/$SERVICE_NAME -fi - -# end the dbus-opendtu process -kill $(pgrep -f "python $SCRIPT_DIR/dbus-opendtu.py") - -# delete old logs if they exist -if [ -f $SCRIPT_DIR/current.log ]; then - rm $SCRIPT_DIR/current.log* -fi - -# remove install.sh from rc.local -STARTUP=$SCRIPT_DIR/install.sh -sed -i "\~$STARTUP~d" $RC_LOCAL_FILE - -# delete log folder in var log if they exist -if [ -d $LOG_DIR ]; then - while true; do - read -p "Do you really wish to delete the log folder $LOG_DIR? [y/n]" yn - case $yn in - [Yy]* ) rm -rf $LOG_DIR; echo $LOG_DIR is deleted ; break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac - done -fi \ No newline at end of file