Used sequpgrade.sh to upgrade existing seqs
This commit is contained in:
@@ -25,19 +25,20 @@ readonly sq_configFileTemplate="$sq_dir/${sq_configFileName}.example"
|
||||
sq_aptOpt=
|
||||
sq_config=0
|
||||
|
||||
step_config() {
|
||||
seq_config() {
|
||||
initSeqConfig -p "$sq_scriptName" "$sq_configFileTemplate"
|
||||
if [ $? -eq 0 ] ; then
|
||||
sq_config=1
|
||||
else
|
||||
# End if no configuration file exists
|
||||
[ $DRY -eq 0 ] && return -1
|
||||
dry || return -1
|
||||
fi
|
||||
|
||||
sc_grocyConf="${sc_grocyDir}/data/config.php"
|
||||
# config not sourced if only profiles should be listed
|
||||
sc_grocyConf="${sc_grocyDir:-}/data/config.php"
|
||||
|
||||
## Apt cmdline option to suppress user interaction
|
||||
[ $QUIET -ne 0 ] && sq_aptOpt="-y"
|
||||
quiet && sq_aptOpt="-y"
|
||||
|
||||
## Return of non zero value will abort the sequence
|
||||
return 0
|
||||
@@ -52,7 +53,7 @@ step_1_info() {
|
||||
echo "Check $toolName status"
|
||||
echoinfo "Returns 1 if update is available"
|
||||
}
|
||||
step_1_alias() { ALIAS="status"; }
|
||||
step_1_alias() { echo "status"; }
|
||||
step_1() {
|
||||
getVersions
|
||||
if [ -e "${sc_grocyDir}" ] ; then
|
||||
@@ -77,7 +78,7 @@ step_1() {
|
||||
}
|
||||
|
||||
step_20_info() { echo "Backup ${toolName}"; }
|
||||
step_20_alias() { ALIAS="backup"; }
|
||||
step_20_alias() { echo "backup"; }
|
||||
step_20() {
|
||||
local lBu="${sc_grocyDir}/${sc_grocyBackup}/${toolName}_$(date +%Y%m%d-%H%M%S).tgz"
|
||||
exe cd ${sc_grocyDir}/..
|
||||
@@ -89,16 +90,16 @@ step_20() {
|
||||
}
|
||||
|
||||
step_22_info() { echo "Install/upgrade ${toolName}"; }
|
||||
step_22_alias() { ALIAS="install"; }
|
||||
step_22_alias() { echo "install"; }
|
||||
step_22() {
|
||||
getVersions
|
||||
if [[ ${versionNow} == ${versionNew} ]] ; then
|
||||
endReturn -o 1 "Latest version ${versionNow} already installed"
|
||||
else
|
||||
if [ -n "${versionNow}" ] ; then
|
||||
echoseq " [I] Upgrading $toolName from ${versionNow} to ${versionNew}"
|
||||
info "Upgrading $toolName from ${versionNow} to ${versionNew}"
|
||||
else
|
||||
echoseq " [I] Installing $toolName version ${versionNew}"
|
||||
info "Installing $toolName version ${versionNew}"
|
||||
fi
|
||||
fi
|
||||
exe wget ${downUrl} -q -O "${grocyDownLoc}"
|
||||
@@ -113,16 +114,16 @@ step_22() {
|
||||
# Populate first config
|
||||
if [ ! -e "${sc_grocyConf}" ] ; then
|
||||
exe cp "${sc_grocyDir}/config-dist.php" "${sc_grocyConf}"
|
||||
echoseq " [I] Please adjust the config: ${sc_grocyConf}"
|
||||
info "Please adjust the config: ${sc_grocyConf}"
|
||||
else
|
||||
echoseq " [I] Please check ${sc_grocyDir}/config-dist.php"
|
||||
echoseq " for new configuration options"
|
||||
info "Please check ${sc_grocyDir}/config-dist.php"
|
||||
info " for new configuration options"
|
||||
fi
|
||||
}
|
||||
|
||||
step_30_alias() { ALIAS="notes"; }
|
||||
step_30_alias() { echo "notes"; }
|
||||
step_30() {
|
||||
outColor green
|
||||
color green
|
||||
cat <<NOTES_END
|
||||
# Behind reverse proxy as subfolder
|
||||
|
||||
@@ -162,5 +163,5 @@ server {
|
||||
NOTES_END
|
||||
}
|
||||
|
||||
VERSION_SEQREV=15
|
||||
readonly sqr_minVersion=16
|
||||
. /usr/local/bin/sequencer.sh
|
||||
|
Reference in New Issue
Block a user