linux installer use existing config

This commit is contained in:
advplyr 2021-09-25 17:37:21 -05:00
parent bf1e6051be
commit ac950f2173
3 changed files with 18 additions and 20 deletions

View File

@ -57,8 +57,7 @@ setup_config() {
AUDIOBOOK_PATH="" AUDIOBOOK_PATH=""
read -p " read -p "
Enter path for your audiobooks [Default: $DEFAULT_AUDIOBOOK_PATH]: Enter path for your audiobooks [Default: $DEFAULT_AUDIOBOOK_PATH]:" AUDIOBOOK_PATH
" AUDIOBOOK_PATH
if [[ -z "$AUDIOBOOK_PATH" ]]; then if [[ -z "$AUDIOBOOK_PATH" ]]; then
AUDIOBOOK_PATH="$DEFAULT_AUDIOBOOK_PATH" AUDIOBOOK_PATH="$DEFAULT_AUDIOBOOK_PATH"
@ -66,8 +65,7 @@ setup_config() {
DATA_PATH="" DATA_PATH=""
read -p " read -p "
Enter path for data files, i.e. streams, downloads, database [Default: $DEFAULT_DATA_PATH]: Enter path for data files, i.e. streams, downloads, database [Default: $DEFAULT_DATA_PATH]:" DATA_PATH
" DATA_PATH
if [[ -z "$DATA_PATH" ]]; then if [[ -z "$DATA_PATH" ]]; then
DATA_PATH="$DEFAULT_DATA_PATH" DATA_PATH="$DEFAULT_DATA_PATH"
@ -75,13 +73,11 @@ setup_config() {
PORT="" PORT=""
read -p " read -p "
Port for the web ui [Default: $DEFAULT_PORT]: Port for the web ui [Default: $DEFAULT_PORT]:" PORT
" PORT
if [[ -z "$PORT" ]]; then if [[ -z "$PORT" ]]; then
PORT="$DEFAULT_PORT" PORT="$DEFAULT_PORT"
fi fi
fi
config_text="AUDIOBOOK_PATH=$AUDIOBOOK_PATH config_text="AUDIOBOOK_PATH=$AUDIOBOOK_PATH
METADATA_PATH=$DATA_PATH/metadata METADATA_PATH=$DATA_PATH/metadata
@ -94,6 +90,8 @@ PORT=$PORT"
echo "$config_text" > /etc/default/audiobookshelf; echo "$config_text" > /etc/default/audiobookshelf;
echo "Config created" echo "Config created"
fi
} }
setup_config setup_config

View File

@ -1,6 +1,6 @@
{ {
"name": "audiobookshelf-client", "name": "audiobookshelf-client",
"version": "1.2.2", "version": "1.2.3",
"description": "Audiobook manager and player", "description": "Audiobook manager and player",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -1,6 +1,6 @@
{ {
"name": "audiobookshelf", "name": "audiobookshelf",
"version": "1.2.2", "version": "1.2.3",
"description": "Self-hosted audiobook server for managing and playing audiobooks", "description": "Self-hosted audiobook server for managing and playing audiobooks",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {