diff --git a/kiauh.sh b/kiauh.sh index ce86d7a..33e781c 100755 --- a/kiauh.sh +++ b/kiauh.sh @@ -39,7 +39,7 @@ OCTOPRINT_DIR=${HOME}/OctoPrint KLIPPERSCREEN_DIR=${HOME}/KlipperScreen KLIPPERSCREEN_ENV_DIR=${HOME}/.KlipperScreen-env #misc -INI_FILE=${SRCDIR}/kiauh/kiauh.ini +INI_FILE=${HOME}/.config/kiauh.ini BACKUP_DIR=${HOME}/kiauh-backups ### set github repos diff --git a/scripts/functions.sh b/scripts/functions.sh index 1e30472..e8823c2 100755 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -464,6 +464,10 @@ write_printer_cfg(){ } init_ini(){ + ### copy an existing kiauh.ini to its new location to keep all possible saved values + if [ -f ${SRCDIR}/kiauh/kiauh.ini ] || [ ! -f $INI_FILE ]; then + cp ${SRCDIR}/kiauh/kiauh.ini $INI_FILE + fi if [ ! -f $INI_FILE ]; then echo -e "#don't edit this file if you don't know what you are doing...\c" > $INI_FILE fi