script: remove redundant systemd constant

This commit is contained in:
Yifei Ding
2021-11-12 15:20:39 -08:00
parent b1bfe7089a
commit 600036059f
9 changed files with 32 additions and 44 deletions

View File

@@ -1,52 +1,50 @@
#!/bin/bash
### set important directories ### set important directories
#kiauh.sh #kiauh.sh
#klipper #klipper
KLIPPER_DIR=${HOME}/klipper readonly KLIPPER_DIR=${HOME}/klipper
KLIPPY_ENV=${HOME}/klippy-env readonly KLIPPY_ENV=${HOME}/klippy-env
#nginx #nginx
NGINX_SA=/etc/nginx/sites-available readonly NGINX_SA=/etc/nginx/sites-available
NGINX_SE=/etc/nginx/sites-enabled readonly NGINX_SE=/etc/nginx/sites-enabled
NGINX_CONFD=/etc/nginx/conf.d readonly NGINX_CONFD=/etc/nginx/conf.d
#moonraker #moonraker
MOONRAKER_DIR=${HOME}/moonraker readonly MOONRAKER_DIR=${HOME}/moonraker
MOONRAKER_ENV=${HOME}/moonraker-env readonly MOONRAKER_ENV=${HOME}/moonraker-env
#mainsail #mainsail
MAINSAIL_DIR=${HOME}/mainsail readonly MAINSAIL_DIR=${HOME}/mainsail
#fluidd #fluidd
FLUIDD_DIR=${HOME}/fluidd readonly FLUIDD_DIR=${HOME}/fluidd
#dwc2 #dwc2
DWC2FK_DIR=${HOME}/dwc2-for-klipper-socket readonly DWC2FK_DIR=${HOME}/dwc2-for-klipper-socket
DWC_ENV_DIR=${HOME}/dwc-env readonly DWC_ENV_DIR=${HOME}/dwc-env
DWC2_DIR=${HOME}/duetwebcontrol readonly DWC2_DIR=${HOME}/duetwebcontrol
#octoprint #octoprint
OCTOPRINT_DIR=${HOME}/OctoPrint readonly OCTOPRINT_DIR=${HOME}/OctoPrint
#KlipperScreen #KlipperScreen
KLIPPERSCREEN_DIR=${HOME}/KlipperScreen readonly KLIPPERSCREEN_DIR=${HOME}/KlipperScreen
KLIPPERSCREEN_ENV_DIR=${HOME}/.KlipperScreen-env readonly KLIPPERSCREEN_ENV_DIR=${HOME}/.KlipperScreen-env
#MoonrakerTelegramBot #MoonrakerTelegramBot
MOONRAKER_TELEGRAM_BOT_DIR=${HOME}/moonraker-telegram-bot readonly MOONRAKER_TELEGRAM_BOT_DIR=${HOME}/moonraker-telegram-bot
MOONRAKER_TELEGRAM_BOT_ENV_DIR=${HOME}/moonraker-telegram-bot-env readonly MOONRAKER_TELEGRAM_BOT_ENV_DIR=${HOME}/moonraker-telegram-bot-env
#misc #misc
INI_FILE=${HOME}/.kiauh.ini readonly INI_FILE=${HOME}/.kiauh.ini
BACKUP_DIR=${HOME}/kiauh-backups readonly BACKUP_DIR=${HOME}/kiauh-backups
readonly SYSTEMDDIR=/etc/systemd/system
### set github repos ### set github repos
KLIPPER_REPO=https://github.com/Klipper3d/klipper.git readonly KLIPPER_REPO=https://github.com/Klipper3d/klipper.git
ARKSINE_REPO=https://github.com/Arksine/klipper.git readonly ARKSINE_REPO=https://github.com/Arksine/klipper.git
DMBUTYUGIN_REPO=https://github.com/dmbutyugin/klipper.git readonly DMBUTYUGIN_REPO=https://github.com/dmbutyugin/klipper.git
DWC2FK_REPO=https://github.com/Stephan3/dwc2-for-klipper-socket.git readonly DWC2FK_REPO=https://github.com/Stephan3/dwc2-for-klipper-socket.git
KLIPPERSCREEN_REPO=https://github.com/jordanruthe/KlipperScreen.git readonly KLIPPERSCREEN_REPO=https://github.com/jordanruthe/KlipperScreen.git
NLEF_REPO=https://github.com/nlef/moonraker-telegram-bot.git readonly NLEF_REPO=https://github.com/nlef/moonraker-telegram-bot.git
#branches #branches
BRANCH_SCURVE_SMOOTHING=dmbutyugin/scurve-smoothing readonly BRANCH_SCURVE_SMOOTHING=dmbutyugin/scurve-smoothing
BRANCH_SCURVE_SHAPING=dmbutyugin/scurve-shaping readonly BRANCH_SCURVE_SHAPING=dmbutyugin/scurve-shaping
###Whiptail ###Whiptail
KIAUH_WHIPTAIL_WIDTH=96 readonly KIAUH_WHIPTAIL_NORMAL_WIDTH=70
KIAUH_WHIPTAIL_HEIGHT=25 readonly KIAUH_WHIPTAIL_NORMAL_HEIGHT=24
readonly KIAUH_WHIPTAIL_SINGLE_LINE_HEIGHT=7
#functions.sh
### base variables
SYSTEMDDIR="/etc/systemd/system"

View File

@@ -5,7 +5,6 @@
# https://github.com/Stephan3/dwc2-for-klipper-socket.git # https://github.com/Stephan3/dwc2-for-klipper-socket.git
PYTHONDIR="${HOME}/dwc-env" PYTHONDIR="${HOME}/dwc-env"
SYSTEMDDIR="/etc/systemd/system"
DWC_USER=${USER} DWC_USER=${USER}
# Step 1: Verify Klipper has been installed # Step 1: Verify Klipper has been installed

View File

@@ -1,5 +1,4 @@
### base variables ### base variables
SYSTEMDDIR="/etc/systemd/system"
DWC_ENV="${HOME}/dwc-env" DWC_ENV="${HOME}/dwc-env"
DWC2_DIR="${HOME}/duetwebcontrol" DWC2_DIR="${HOME}/duetwebcontrol"

View File

@@ -1,5 +1,4 @@
### base variables ### base variables
SYSTEMDDIR="/etc/systemd/system"
KLIPPY_ENV="${HOME}/klippy-env" KLIPPY_ENV="${HOME}/klippy-env"
KLIPPER_DIR="${HOME}/klipper" KLIPPER_DIR="${HOME}/klipper"

View File

@@ -1,5 +1,4 @@
### base variables ### base variables
SYSTEMDDIR="/etc/systemd/system"
WEBCAMD_SRC="https://raw.githubusercontent.com/raymondh2/MainsailOS/master/src/modules/mjpgstreamer/filesystem/root/usr/local/bin/webcamd" WEBCAMD_SRC="https://raw.githubusercontent.com/raymondh2/MainsailOS/master/src/modules/mjpgstreamer/filesystem/root/usr/local/bin/webcamd"
WEBCAM_TXT_SRC="https://raw.githubusercontent.com/raymondh2/MainsailOS/master/src/modules/mjpgstreamer/filesystem/home/pi/klipper_config/webcam.txt" WEBCAM_TXT_SRC="https://raw.githubusercontent.com/raymondh2/MainsailOS/master/src/modules/mjpgstreamer/filesystem/home/pi/klipper_config/webcam.txt"

View File

@@ -1,5 +1,4 @@
### base variables ### base variables
SYSTEMDDIR="/etc/systemd/system"
MOONRAKER_ENV="${HOME}/moonraker-env" MOONRAKER_ENV="${HOME}/moonraker-env"
MOONRAKER_DIR="${HOME}/moonraker" MOONRAKER_DIR="${HOME}/moonraker"
MOONRAKER_REPO="https://github.com/Arksine/moonraker.git" MOONRAKER_REPO="https://github.com/Arksine/moonraker.git"

View File

@@ -1,5 +1,4 @@
### base variables ### base variables
SYSTEMDDIR="/etc/systemd/system"
OCTOPRINT_ENV="${HOME}/OctoPrint" OCTOPRINT_ENV="${HOME}/OctoPrint"
octoprint_setup_dialog(){ octoprint_setup_dialog(){

View File

@@ -1,5 +1,4 @@
### base variables ### base variables
SYSTEMDDIR="/etc/systemd/system"
get_theme_list(){ get_theme_list(){
theme_csv_url="https://raw.githubusercontent.com/meteyou/mainsail/develop/docs/_data/themes.csv" theme_csv_url="https://raw.githubusercontent.com/meteyou/mainsail/develop/docs/_data/themes.csv"

View File

@@ -1,6 +1,3 @@
### base variables
SYSTEMDDIR="/etc/systemd/system"
remove_klipper(){ remove_klipper(){
shopt -s extglob # enable extended globbing shopt -s extglob # enable extended globbing
### ask the user if he wants to uninstall moonraker too. ### ask the user if he wants to uninstall moonraker too.