From 64ae8ef849e0016b29d9966e9f24c2520c4679ac Mon Sep 17 00:00:00 2001 From: Mark Cooper Date: Sat, 25 Sep 2021 17:37:21 -0500 Subject: [PATCH] linux installer use existing config --- build/debian/DEBIAN/preinst | 34 ++++++++++++++++------------------ client/package.json | 2 +- package.json | 2 +- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/build/debian/DEBIAN/preinst b/build/debian/DEBIAN/preinst index 157fc5cc..351245bb 100644 --- a/build/debian/DEBIAN/preinst +++ b/build/debian/DEBIAN/preinst @@ -57,8 +57,7 @@ setup_config() { AUDIOBOOK_PATH="" read -p " - Enter path for your audiobooks [Default: $DEFAULT_AUDIOBOOK_PATH]: - " AUDIOBOOK_PATH + Enter path for your audiobooks [Default: $DEFAULT_AUDIOBOOK_PATH]:" AUDIOBOOK_PATH if [[ -z "$AUDIOBOOK_PATH" ]]; then AUDIOBOOK_PATH="$DEFAULT_AUDIOBOOK_PATH" @@ -66,8 +65,7 @@ setup_config() { DATA_PATH="" read -p " - Enter path for data files, i.e. streams, downloads, database [Default: $DEFAULT_DATA_PATH]: - " DATA_PATH + Enter path for data files, i.e. streams, downloads, database [Default: $DEFAULT_DATA_PATH]:" DATA_PATH if [[ -z "$DATA_PATH" ]]; then DATA_PATH="$DEFAULT_DATA_PATH" @@ -75,25 +73,25 @@ setup_config() { PORT="" read -p " - Port for the web ui [Default: $DEFAULT_PORT]: - " PORT + Port for the web ui [Default: $DEFAULT_PORT]:" PORT if [[ -z "$PORT" ]]; then PORT="$DEFAULT_PORT" fi + + config_text="AUDIOBOOK_PATH=$AUDIOBOOK_PATH + METADATA_PATH=$DATA_PATH/metadata + CONFIG_PATH=$DATA_PATH/config + FFMPEG_PATH=/usr/lib/audiobookshelf-ffmpeg/ffmpeg + PORT=$PORT" + + echo "$config_text" + + echo "$config_text" > /etc/default/audiobookshelf; + + echo "Config created" + fi - - config_text="AUDIOBOOK_PATH=$AUDIOBOOK_PATH -METADATA_PATH=$DATA_PATH/metadata -CONFIG_PATH=$DATA_PATH/config -FFMPEG_PATH=/usr/lib/audiobookshelf-ffmpeg/ffmpeg -PORT=$PORT" - - echo "$config_text" - - echo "$config_text" > /etc/default/audiobookshelf; - - echo "Config created" } setup_config diff --git a/client/package.json b/client/package.json index 487e876e..eb896743 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "audiobookshelf-client", - "version": "1.2.2", + "version": "1.2.3", "description": "Audiobook manager and player", "main": "index.js", "scripts": { diff --git a/package.json b/package.json index 02863f30..f2303c9b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "audiobookshelf", - "version": "1.2.2", + "version": "1.2.3", "description": "Self-hosted audiobook server for managing and playing audiobooks", "main": "index.js", "scripts": {