Script AlpinePHPTool: Fixed incorrect variable and error catching
This commit is contained in:
@@ -50,6 +50,11 @@ set_mode () {
|
|||||||
mode=$1
|
mode=$1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo_exit (){
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
#Arugment/optin handeling
|
#Arugment/optin handeling
|
||||||
while getopts 'dfpuh' opt; do
|
while getopts 'dfpuh' opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
@@ -133,12 +138,12 @@ fetch_Config() {
|
|||||||
#Unique settings for configuration
|
#Unique settings for configuration
|
||||||
case $config in
|
case $config in
|
||||||
mailbackup)
|
mailbackup)
|
||||||
wget https://git.bprieshof.nl/Tools/MailBackup-sys/raw/branch/alpine/Configs/php.conf -O /tmp/php.conf || echo "ERROR: Config download failed";exit 1
|
wget https://git.bprieshof.nl/Tools/MailBackup-sys/raw/branch/alpine/Configs/php.conf -O /tmp/php.conf || echo_exit "ERROR: Config download failed"
|
||||||
wget https://git.bprieshof.nl/Tools/MailBackup-sys/raw/branch/alpine/Configs/php.pkglist -O /tmp/php.pkglist || echo "ERROR: Config download failed";exit 1
|
wget https://git.bprieshof.nl/Tools/MailBackup-sys/raw/branch/alpine/Configs/php.pkglist -O /tmp/php.pkglist || echo_exit "ERROR: Config download failed"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
wget "$repo"/raw/branch/"$branch"/CT-Files/$config/Configs/php.conf -O /tmp/php.conf || echo "ERROR: Config download failed";exit 1
|
wget "$gitRepo"/raw/branch/"$gitBranch"/CT-Files/$config/Configs/php.conf -O /tmp/php.conf || echo_exit "ERROR: Config download failed"
|
||||||
wget "$repo"/raw/branch/"$branch"/CT-Files/"$config"/Configs/php.pkglist -O /tmp/php.pkglist || echo "ERROR: Config download failed";exit 1
|
wget "$gitRepo"/raw/branch/"$gitBranch"/CT-Files/"$config"/Configs/php.pkglist -O /tmp/php.pkglist || echo_exit "ERROR: Config download failed"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user