mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-07-14 09:12:59 -07:00
Argument changes (#106)
* Standardize tabs * Change options to be robust * Fix typos in usage * Only trim first and last single quotes * Remove unnecessary variable * Give error message on old style config, but don't break
This commit is contained in:
parent
06ce11511a
commit
d51ed35a81
2 changed files with 220 additions and 122 deletions
37
README.md
37
README.md
|
@ -30,30 +30,26 @@ The main benefit with git clone is that you can update to latest version very ea
|
||||||
|
|
||||||
## 2. Setting it up
|
## 2. Setting it up
|
||||||
|
|
||||||
plexupdate.sh looks for a file named `.plexupdate` located in your home directory. Please note that I'm referring to the home directory of the user who is running the plexupdate.sh ... If that user is someone else (root for instance) you'll need to make sure that user has the config file set up properly as well.
|
To quickly setup plexupdate.sh, you should run it the first time like below:
|
||||||
|
|
||||||
The contents of this file are usually:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
EMAIL="my.email@plex-server.com"
|
./plexupdate.sh --email="my.email@plex-server.com" --pass="my-secret-plex-password" --dldir="/a/folder/to/save/the/files/in" --saveconfig
|
||||||
PASS="my-secret-plex-password"
|
|
||||||
DOWNLOADDIR="/a/folder/to/save/the/files/in"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Obviously you need to change these so they match your account information. And if you don't put anything as a `DOWNLOADDIR`, the tool will use the folder you're executing the script from. So take care.
|
Obviously you need to change these so they match your account information. And if you don't put anything as for the ```--dldir``` option, the tool will use the folder you're executing the script from. So take care.
|
||||||
|
|
||||||
## 3. Advanced options
|
## 3. Advanced options
|
||||||
|
|
||||||
You can point out a different file than ```.plexupdate``` by providing it as the last argument to the script. It HAS to be the LAST argument, or it will be ignored. Any options set by the config file can be overriden with command-line options.
|
You can point out a different file than ```.plexupdate``` by providing it as the argument to the ```--config``` option. Any options set by the config file can be overridden with command-line options.
|
||||||
|
|
||||||
There are also a few additional options for the more enterprising user. Setting any of these to `yes` will enable the function.
|
There are also a few additional options for the more enterprising user. Setting any of these to `yes` will enable the function.
|
||||||
|
|
||||||
- PLEXSERVER
|
- PLEXSERVER
|
||||||
If set, and combined with AUTOINSTALL, the script will automatically check if the server is in-use and deferr the update. Great for crontab users. PLEXSERVER should be set to the IP/DNS of your Plex Media Server, which typically is 127.0.0.1
|
If set, and combined with AUTOINSTALL, the script will automatically check if the server is in-use and defer the update. Great for crontab users. PLEXSERVER should be set to the IP/DNS of your Plex Media Server, which typically is 127.0.0.1
|
||||||
- AUTOUPDATE
|
- AUTOUPDATE
|
||||||
Makes plexupdate.sh automatically update itself using git. Note! This will fail if git isn't available on the command line.
|
Makes plexupdate.sh automatically update itself using git. Note! This will fail if git isn't available on the command line.
|
||||||
- AUTOINSTALL
|
- AUTOINSTALL
|
||||||
Automatically installs the newly downloaded version. Currently works for debian based systems as well as rpm based distros. Will fail miserably if you're not root.
|
Automatically installs the newly downloaded version. Currently works for Debian based systems as well as rpm based distros. Will fail miserably if you're not root.
|
||||||
- AUTODELETE
|
- AUTODELETE
|
||||||
Once successfully downloaded and installed, it will delete the package (want not, waste not? ;-))
|
Once successfully downloaded and installed, it will delete the package (want not, waste not? ;-))
|
||||||
- PUBLIC
|
- PUBLIC
|
||||||
|
@ -76,7 +72,24 @@ Most of these options can be specified on the command-line as well, this is just
|
||||||
|
|
||||||
If you want to use plexupdate as either a cron job or as a [systemd job](https://github.com/mrworf/plexupdate/wiki/Running-plexupdate-daily-as-a-systemd-timer), the -c option should do what you want. All non-error exit codes will be set to 0 and no output will be printed to stdout unless something has actually been done. (a new version was downloaded, installed, etc)
|
If you want to use plexupdate as either a cron job or as a [systemd job](https://github.com/mrworf/plexupdate/wiki/Running-plexupdate-daily-as-a-systemd-timer), the -c option should do what you want. All non-error exit codes will be set to 0 and no output will be printed to stdout unless something has actually been done. (a new version was downloaded, installed, etc)
|
||||||
|
|
||||||
If you don't even want to know when something has been done, you can combine this with the -q option and you will only receive output in the event of an error. Everything else will just silenty finish without producing any output.
|
If you don't even want to know when something has been done, you can combine this with the -q option and you will only receive output in the event of an error. Everything else will just silently finish without producing any output.
|
||||||
|
|
||||||
|
### Command Line Options
|
||||||
|
|
||||||
|
Several new command line options are available. They can be specified in any order.
|
||||||
|
|
||||||
|
- ```--config <path/to/config/file>```
|
||||||
|
Defines the location the script should look for the config file.
|
||||||
|
- ```--email <Plex.tv email>```
|
||||||
|
Email to sign in to Plex.tv
|
||||||
|
- ```--pass <Plex.tv password>```
|
||||||
|
Password to sign in to Plex.tv
|
||||||
|
- ```--dldir <path/to/where/you/want/files/downloaded/to>```
|
||||||
|
This is the folder that the files will be downloaded to.
|
||||||
|
- ```--server <Plex server address>```
|
||||||
|
This is the address that Plex Media Server is on. Setting this will enable a check to see if users are on the server prior to the software being updated.
|
||||||
|
- ```--saveconfig```
|
||||||
|
Saves the configuration as it is currently. This will take whatever is in the config file, plus whatever is specified on the command line and will save the config file with that information. Any information in the config file that plexupdate.sh does not understand or use WILL BE LOST.
|
||||||
|
|
||||||
# Running it
|
# Running it
|
||||||
|
|
||||||
|
@ -86,7 +99,7 @@ Overall it tries to give you hints regarding why it isn't doing what you expecte
|
||||||
|
|
||||||
# Trivia
|
# Trivia
|
||||||
|
|
||||||
- "kaka" is swedish for "cookie"
|
- "kaka" is Swedish for "cookie"
|
||||||
|
|
||||||
# TL;DR
|
# TL;DR
|
||||||
Open a terminal or SSH on the server running Plex Media Center
|
Open a terminal or SSH on the server running Plex Media Center
|
||||||
|
|
219
plexupdate.sh
219
plexupdate.sh
|
@ -74,64 +74,13 @@ FILE_FAILCAUSE=$(mktemp /tmp/plexupdate.failcause.XXXX)
|
||||||
FILE_KAKA=$(mktemp /tmp/plexupdate.kaka.XXXX)
|
FILE_KAKA=$(mktemp /tmp/plexupdate.kaka.XXXX)
|
||||||
FILE_SHA=$(mktemp /tmp/plexupdate.sha.XXXX)
|
FILE_SHA=$(mktemp /tmp/plexupdate.sha.XXXX)
|
||||||
|
|
||||||
# Sanity, make sure wget is in our path...
|
|
||||||
if ! hash wget 2>/dev/null; then
|
|
||||||
echo "ERROR: This script requires wget in the path. It could also signify that you don't have the tool installed." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Allow manual control of configfile
|
|
||||||
HASCFG="${@: -1}"
|
|
||||||
if [ ! -z "${HASCFG}" -a ! "${HASCFG:0:1}" = "-" ]; then
|
|
||||||
if [ -f "${HASCFG}" ]; then
|
|
||||||
source "${HASCFG}"
|
|
||||||
else
|
|
||||||
echo "ERROR: Cannot load configuration ${HASCFG}" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# Load settings from config file if it exists
|
|
||||||
# Also, respect SUDO_USER and try that first
|
|
||||||
if [ ! -z "${SUDO_USER}" ]; then
|
|
||||||
# Make sure nothing bad comes from this (since we use eval)
|
|
||||||
ERROR=0
|
|
||||||
if [[ $SUDO_USER == *";"* ]]; then ERROR=1 ; # Allows more commands
|
|
||||||
elif [[ $SUDO_USER == *" "* ]]; then ERROR=1 ; # Space is not a good thing
|
|
||||||
elif [[ $SUDO_USER == *"&"* ]]; then ERROR=1 ; # Spinning off the command is bad
|
|
||||||
elif [[ $SUDO_USER == *"<"* ]]; then ERROR=1 ; # No redirection
|
|
||||||
elif [[ $SUDO_USER == *">"* ]]; then ERROR=1 ; # No redirection
|
|
||||||
elif [[ $SUDO_USER == *"|"* ]]; then ERROR=1 ; # No pipes
|
|
||||||
elif [[ $SUDO_USER == *"~"* ]]; then ERROR=1 ; # No tilde
|
|
||||||
fi
|
|
||||||
if [ ${ERROR} -gt 0 ]; then
|
|
||||||
echo "ERROR: SUDO_USER variable is COMPROMISED: \"${SUDO_USER}\"" >&2
|
|
||||||
exit 255
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Try using original user's config
|
|
||||||
CONFIGDIR="$( eval cd ~${SUDO_USER} 2>/dev/null && pwd )"
|
|
||||||
if [ -z "${CONFIGDIR}" ]; then
|
|
||||||
echo "WARNING: SUDO_USER \"${SUDO_USER}\" does not have a valid home directory, ignoring." >&2
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -z "${CONFIGDIR}" -a -f "${CONFIGDIR}/.plexupdate" ]; then
|
|
||||||
#echo "INFO: Using \"${SUDO_USER}\" configuration: ${CONFIGDIR}/.plexupdate"
|
|
||||||
source "${CONFIGDIR}/.plexupdate"
|
|
||||||
elif [ -f ~/.plexupdate ]; then
|
|
||||||
# Fallback for compatibility
|
|
||||||
source ~/.plexupdate
|
|
||||||
fi
|
|
||||||
elif [ -f ~/.plexupdate ]; then
|
|
||||||
# Fallback for compatibility
|
|
||||||
source ~/.plexupdate
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Current pages we need - Do not change unless Plex.tv changes again
|
# Current pages we need - Do not change unless Plex.tv changes again
|
||||||
URL_LOGIN=https://plex.tv/users/sign_in.json
|
URL_LOGIN=https://plex.tv/users/sign_in.json
|
||||||
URL_DOWNLOAD=https://plex.tv/api/downloads/1.json?channel=plexpass
|
URL_DOWNLOAD=https://plex.tv/api/downloads/1.json?channel=plexpass
|
||||||
URL_DOWNLOAD_PUBLIC=https://plex.tv/api/downloads/1.json
|
URL_DOWNLOAD_PUBLIC=https://plex.tv/api/downloads/1.json
|
||||||
|
|
||||||
|
# Functions for rest of script
|
||||||
|
|
||||||
cronexit() {
|
cronexit() {
|
||||||
# Don't give anything but true error codes if in CRON mode
|
# Don't give anything but true error codes if in CRON mode
|
||||||
RAWEXIT=$1
|
RAWEXIT=$1
|
||||||
|
@ -142,10 +91,8 @@ cronexit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: $(basename $0) [-acfhopqsSuU] [config file]"
|
echo "Usage: $(basename $0) [-acdfFhlpqsuU] [<long options>]"
|
||||||
echo ""
|
echo ""
|
||||||
echo " config file overrides the default ~/.plexupdate"
|
|
||||||
echo " If used, it must be the LAST option or it will be ignored"
|
|
||||||
echo ""
|
echo ""
|
||||||
echo " -a Auto install if download was successful (requires root)"
|
echo " -a Auto install if download was successful (requires root)"
|
||||||
echo " -c Cron mode, only fatal errors return non-zero cronexit code"
|
echo " -c Cron mode, only fatal errors return non-zero cronexit code"
|
||||||
|
@ -161,6 +108,14 @@ usage() {
|
||||||
echo " -s Auto start (needed for some distros)"
|
echo " -s Auto start (needed for some distros)"
|
||||||
echo " -u Auto update plexupdate.sh before running it (experimental)"
|
echo " -u Auto update plexupdate.sh before running it (experimental)"
|
||||||
echo " -U Do not autoupdate plexupdate.sh (experimental, default)"
|
echo " -U Do not autoupdate plexupdate.sh (experimental, default)"
|
||||||
|
echo ""
|
||||||
|
echo " Long Argument Options:"
|
||||||
|
echo " --config <path/to/config/file> Configuration file to use"
|
||||||
|
echo " --dldir <path/to/download/dir> Download directory to use"
|
||||||
|
echo " --email <plex.tv email> Plex.TV email address"
|
||||||
|
echo " --pass <plex.tv password> Plex.TV password"
|
||||||
|
echo " --server <Plex server address> Address of Plex Server"
|
||||||
|
echo " --saveconfig Save the configuration to config file"
|
||||||
echo
|
echo
|
||||||
cronexit 0
|
cronexit 0
|
||||||
}
|
}
|
||||||
|
@ -190,32 +145,64 @@ running() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
trimQuotes() {
|
||||||
|
local __buffer=$1
|
||||||
|
|
||||||
|
# Remove leading single quote
|
||||||
|
__buffer=${__buffer#\'}
|
||||||
|
# Remove ending single quote
|
||||||
|
__buffer=${__buffer%\'}
|
||||||
|
|
||||||
|
echo $__buffer
|
||||||
|
}
|
||||||
|
|
||||||
|
HASCFG="${@: -1}"
|
||||||
|
if [ ! -z "${HASCFG}" -a ! "${HASCFG:0:1}" = "-" ]; then
|
||||||
|
if [ -f "${HASCFG}" ]; then
|
||||||
|
echo "WARNING: Specifying config file as last argument is deprecated. Use --config <path> instead."
|
||||||
|
CONFIGFILE=${HASCFG}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Parse commandline
|
# Parse commandline
|
||||||
ALLARGS=( "$@" )
|
ALLARGS=( "$@" )
|
||||||
optstring="acCdfFhlpqrSsuU"
|
optstring="acCdfFhlpqrSsuU -l config:,dldir:,email:,pass:,server:,saveconfig"
|
||||||
getopt -T >/dev/null
|
getopt -T >/dev/null
|
||||||
if [ $? -eq 4 ]; then
|
if [ $? -eq 4 ]; then
|
||||||
optstring="-o $optstring"
|
optstring="-o $optstring"
|
||||||
fi
|
fi
|
||||||
set -- $(getopt $optstring -- "$@")
|
GETOPTRES=$(getopt $optstring -- "$@")
|
||||||
|
if [ $? -eq 1 ]; then
|
||||||
|
cronexit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -- ${GETOPTRES}
|
||||||
while true;
|
while true;
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
(-h) usage;;
|
(-h) usage;;
|
||||||
(-a) AUTOINSTALL=yes;;
|
(-a) AUTOINSTALL_CL=yes;;
|
||||||
(-c) CRON=yes;;
|
(-c) CRON_CL=yes;;
|
||||||
(-C) echo "ERROR: CRON option has changed, please review README.md" >&2; cronexit 255;;
|
(-C) echo "ERROR: CRON option has changed, please review README.md" >&2; cronexit 255;;
|
||||||
(-d) AUTODELETE=yes;;
|
(-d) AUTODELETE_CL=yes;;
|
||||||
(-f) FORCE=yes;;
|
(-f) FORCE_CL=yes;;
|
||||||
(-F) FORCEALL=yes;;
|
(-F) FORCEALL_CL=yes;;
|
||||||
(-l) LISTOPTS=yes;;
|
(-l) LISTOPTS=yes;;
|
||||||
(-p) PUBLIC=yes;;
|
(-p) PUBLIC_CL=yes;;
|
||||||
(-q) QUIET=yes;;
|
(-q) QUIET_CL=yes;;
|
||||||
(-r) PRINT_URL=yes;;
|
(-r) PRINT_URL=yes;;
|
||||||
(-s) AUTOSTART=yes;;
|
(-s) AUTOSTART_CL=yes;;
|
||||||
(-S) echo "ERROR: SILENT option has been removed, please use QUIET (-q) instead" >&2; cronexit 255;;
|
(-S) echo "ERROR: SILENT option has been removed, please use QUIET (-q) instead" >&2; cronexit 255;;
|
||||||
(-u) AUTOUPDATE=yes;;
|
(-u) AUTOUPDATE_CL=yes;;
|
||||||
(-U) IGNOREAUTOUPDATE=yes;;
|
(-U) IGNOREAUTOUPDATE=yes;;
|
||||||
|
|
||||||
|
(--config) shift; CONFIGFILE="$1"; CONFIGFILE=$(trimQuotes ${CONFIGFILE});;
|
||||||
|
(--dldir) shift; DOWNLOADDIR_CL="$1"; DOWNLOADDIR_CL=$(trimQuotes ${DOWNLOADDIR_CL});;
|
||||||
|
(--email) shift; EMAIL_CL="$1"; EMAIL_CL=$(trimQuotes ${EMAIL_CL});;
|
||||||
|
(--pass) shift; PASS_CL="$1"; PASS_CL=$(trimQuotes ${PASS_CL});;
|
||||||
|
(--server) shift; PLEXSERVER_CL="$1"; PLEXSERVER_CL=$(trimQuotes ${PLEXSERVER_CL});;
|
||||||
|
(--saveconfig) SAVECONFIG=yes;;
|
||||||
|
|
||||||
(--) ;;
|
(--) ;;
|
||||||
(-*) echo "ERROR: unrecognized option $1" >&2; usage; cronexit 1;;
|
(-*) echo "ERROR: unrecognized option $1" >&2; usage; cronexit 1;;
|
||||||
(*) break;;
|
(*) break;;
|
||||||
|
@ -223,6 +210,103 @@ do
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Sanity, make sure wget is in our path...
|
||||||
|
if ! hash wget 2>/dev/null; then
|
||||||
|
echo "ERROR: This script requires wget in the path. It could also signify that you don't have the tool installed." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Allow manual control of configfile
|
||||||
|
if [ ! -z "${CONFIGFILE}" ]; then
|
||||||
|
if [ -f "${CONFIGFILE}" ]; then
|
||||||
|
source "${CONFIGFILE}"
|
||||||
|
else
|
||||||
|
echo "ERROR: Cannot load configuration ${CONFIGFILE}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Load settings from config file if it exists
|
||||||
|
# Also, respect SUDO_USER and try that first
|
||||||
|
if [ ! -z "${SUDO_USER}" ]; then
|
||||||
|
# Make sure nothing bad comes from this (since we use eval)
|
||||||
|
ERROR=0
|
||||||
|
if [[ $SUDO_USER == *";"* ]]; then ERROR=1 ; # Allows more commands
|
||||||
|
elif [[ $SUDO_USER == *" "* ]]; then ERROR=1 ; # Space is not a good thing
|
||||||
|
elif [[ $SUDO_USER == *"&"* ]]; then ERROR=1 ; # Spinning off the command is bad
|
||||||
|
elif [[ $SUDO_USER == *"<"* ]]; then ERROR=1 ; # No redirection
|
||||||
|
elif [[ $SUDO_USER == *">"* ]]; then ERROR=1 ; # No redirection
|
||||||
|
elif [[ $SUDO_USER == *"|"* ]]; then ERROR=1 ; # No pipes
|
||||||
|
elif [[ $SUDO_USER == *"~"* ]]; then ERROR=1 ; # No tilde
|
||||||
|
fi
|
||||||
|
if [ ${ERROR} -gt 0 ]; then
|
||||||
|
echo "ERROR: SUDO_USER variable is COMPROMISED: \"${SUDO_USER}\"" >&2
|
||||||
|
exit 255
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Try using original user's config
|
||||||
|
CONFIGDIR="$( eval cd ~${SUDO_USER} 2>/dev/null && pwd )"
|
||||||
|
if [ -z "${CONFIGDIR}" ]; then
|
||||||
|
echo "WARNING: SUDO_USER \"${SUDO_USER}\" does not have a valid home directory, ignoring." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "${CONFIGDIR}" -a -f "${CONFIGDIR}/.plexupdate" ]; then
|
||||||
|
#echo "INFO: Using \"${SUDO_USER}\" configuration: ${CONFIGDIR}/.plexupdate"
|
||||||
|
CONFIGFILE="${CONFIGDIR}/.plexupdate"
|
||||||
|
source "${CONFIGDIR}/.plexupdate"
|
||||||
|
elif [ -f ~/.plexupdate ]; then
|
||||||
|
# Fallback for compatibility
|
||||||
|
CONFIGFILE="${HOME}/.plexupdate" # tilde expansion won't happen later.
|
||||||
|
source ~/.plexupdate
|
||||||
|
fi
|
||||||
|
elif [ -f ~/.plexupdate ]; then
|
||||||
|
# Fallback for compatibility
|
||||||
|
CONFIGFILE="${HOME}/.plexupdate"
|
||||||
|
source ~/.plexupdate
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# The way I wrote this, it assumes that whatever we put on the command line is what we want and should override
|
||||||
|
# any values in the configuration file. As a result, we need to check if they've been set on the command line
|
||||||
|
# and overwrite the values that may have been loaded with the config file
|
||||||
|
|
||||||
|
for VAR in AUTOINSTALL CRON AUTODELETE DOWNLOADDIR EMAIL PASS FORCE FORCEALL PUBLIC QUIET AUTOSTART AUTOUPDATE PLEXSERVER
|
||||||
|
do
|
||||||
|
VAR2="$VAR""_CL"
|
||||||
|
if [ ! -z ${!VAR2} ]; then
|
||||||
|
eval $VAR=${!VAR2}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# This will destroy and recreate the config file. Any settings that are set in the config file but are no longer
|
||||||
|
# valid will NOT be saved.
|
||||||
|
if [ "${SAVECONFIG}" = "yes" ]; then
|
||||||
|
echo "# Config file for plexupdate" >${CONFIGFILE:="${HOME}/.plexupdate"}
|
||||||
|
|
||||||
|
for VAR in AUTOINSTALL CRON AUTODELETE DOWNLOADDIR EMAIL PASS FORCE FORCEALL PUBLIC QUIET AUTOSTART AUTOUPDATE PLEXSERVER
|
||||||
|
do
|
||||||
|
if [ ! -z ${!VAR} ]; then
|
||||||
|
|
||||||
|
# The following keys have defaults set in this file. We don't want to include these values if they are the default.
|
||||||
|
if [ ${VAR} = "FORCE" \
|
||||||
|
-o ${VAR} = "FORCEALL" \
|
||||||
|
-o ${VAR} = "PUBLIC" \
|
||||||
|
-o ${VAR} = "AUTOINSTALL" \
|
||||||
|
-o ${VAR} = "AUTODELETE" \
|
||||||
|
-o ${VAR} = "AUTOUPDATE" \
|
||||||
|
-o ${VAR} = "AUTOSTART" \
|
||||||
|
-o ${VAR} = "CRON" \
|
||||||
|
-o ${VAR} = "QUIET" ]; then
|
||||||
|
|
||||||
|
if [ ${!VAR} = "yes" ]; then
|
||||||
|
echo "${VAR}=${!VAR}" >> ${CONFIGFILE}
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "${VAR}=${!VAR}" >> ${CONFIGFILE}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${IGNOREAUTOUPDATE}" = "yes" ]; then
|
if [ "${IGNOREAUTOUPDATE}" = "yes" ]; then
|
||||||
AUTOUPDATE=no
|
AUTOUPDATE=no
|
||||||
fi
|
fi
|
||||||
|
@ -419,6 +503,7 @@ if [ "${PUBLIC}" = "no" ]; then
|
||||||
rm "${FILE_FAILCAUSE}"
|
rm "${FILE_FAILCAUSE}"
|
||||||
|
|
||||||
echo "OK"
|
echo "OK"
|
||||||
|
|
||||||
elif [ "$PUBLIC" != "no" ]; then
|
elif [ "$PUBLIC" != "no" ]; then
|
||||||
# It's a public version, so change URL and make doubly sure that cookies are empty
|
# It's a public version, so change URL and make doubly sure that cookies are empty
|
||||||
rm 2>/dev/null >/dev/null "${FILE_KAKA}"
|
rm 2>/dev/null >/dev/null "${FILE_KAKA}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue