Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
AWS IAM Roles failing with backups.
Installer fixed for wrng errors displayed.
  • Loading branch information
QROkes committed Oct 6, 2023
1 parent 8a06fb6 commit 22bd822
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/bkp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ check_duply_profile() {


bkp_s3_profile() {
if [[ ! -f $HOME/.aws/credentials || ( -f $HOME/.aws/credentials && ( ! -s $HOME/.aws/credentials || -z $(grep '[^[:space:]]' $HOME/.aws/credentials ))) && $(conf_read awsiamrole) != true ]]; then
if [[ ( ! -f $HOME/.aws/credentials || ( -f $HOME/.aws/credentials && ( ! -s $HOME/.aws/credentials || -z $(grep '[^[:space:]]' $HOME/.aws/credentials )))) && $(conf_read awsiamrole) != true ]]; then
echo "${red}[ERROR] AWS S3 Credentials not found!${end}"
exit 1
fi
Expand Down Expand Up @@ -403,7 +403,7 @@ bkp_s3_list() {


s3_send() {
if [[ ! -f $HOME/.aws/credentials || ( -f $HOME/.aws/credentials && ( ! -s $HOME/.aws/credentials || -z $(grep '[^[:space:]]' $HOME/.aws/credentials ))) && $(conf_read awsiamrole) != true ]]; then
if [[ ( ! -f $HOME/.aws/credentials || ( -f $HOME/.aws/credentials && ( ! -s $HOME/.aws/credentials || -z $(grep '[^[:space:]]' $HOME/.aws/credentials )))) && $(conf_read awsiamrole) != true ]]; then
echo "${red}[ERROR] AWS S3 Credentials not found!${end}"
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion lib/general
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Prevent 'tput' errors when running from Cron
[[ -z $TERM || $TERM == "unknown" || $TERM == "dumb" ]] && export TERM=dumb

readonly app_version="1.17.5"
readonly app_version="1.17.6"
readonly svr_version="1.8"
readonly os_ubuntu_supported=(bionic focal jammy) # https://ubuntu.com/about/release-cycle
readonly php_supported=(7.4 8.0 8.1 8.2) # https://www.php.net/supported-versions.php
Expand Down
28 changes: 22 additions & 6 deletions weby
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ if [[ -n $ver ]]; then
if [[ $code == 200 ]]; then
sudo wget --timeout=15 -t 1 -qrO $HOME/webinoly.tar https://qrok.es/webinoly?version=$ver
[[ $ver == "beta" ]] && echo "$(tput setaf 1)[WARNING] You are installing a BETA version of Webinoly and it's not recommended for production enviroments.$(tput sgr0)"
type="Custom"
else
echo "$(tput setaf 1)[ERROR] Version not found or not available! ($code) $(tput sgr0)"
sudo rm weby
Expand Down Expand Up @@ -157,6 +158,19 @@ if [[ -f /opt/webinoly/webinoly.conf ]]; then
oldver=$(conf_read server-version)
newver=$svr_version
echo "${gre}${dim}Webinoly Configuration file was found, so we will use it!${end}"

# Reinstall after uninstalled! (Can be considered new)
if [[ -z $update ]] && ! [[ $ver =~ ^(alpha|beta)$ ]]; then
new_install="true"
echo "${blu}${dim}It seems like you're reinstalling Webinoly! (Upgrading from: ${oldapp})${end} ${blu}${bol}Welcome back!!!${end}"

# Downgrade!
elif [[ -n $update && $type == "Custom" ]]; then
echo "${blu}Updating to the latest version is always recommended! ${dim}(Downgrade to: ${ver})${end}"
fi

elif [[ $type == "Custom" ]]; then
echo "${blu}Custom version installed: ${ver}${end}"
else
new_install="true"
fi
Expand All @@ -165,7 +179,10 @@ fi
# Write app version
webyversion=$app_version
conf_write app-version $webyversion
[[ $ver =~ ^(alpha|beta)$ ]] && conf_write branch $ver
if [[ $ver =~ ^(alpha|beta)$ ]]; then
conf_write branch $ver
echo "${blu}${bol}This is a testing version, please don't use it in production!${end}"
fi


# Ping to Webinoly Stats
Expand All @@ -177,17 +194,16 @@ if [[ $statskip != "true" ]]; then
type="New"
elif [[ $ver == "beta" ]]; then
type="Beta"
elif [[ -n $update && $ver =~ ^[0-9]{1}\.[0-9]{1,2}\.[0-9]{1,2}$ ]]; then
elif [[ -n $update && $type == "Custom" ]]; then
type="Downgrade"
webyversion=$(wget --timeout=10 -t 1 -qO- https://api.webinoly.com/check?text=true)
opt=$ver
elif [[ -n $setup && $ver =~ ^[0-9]{1}\.[0-9]{1,2}\.[0-9]{1,2}$ ]]; then
type="Custom"
webyversion=$(wget --timeout=10 -t 1 -qO- https://api.webinoly.com/check?text=true)
opt=$ver
elif [[ -n $update && -n $oldapp ]]; then
type="Updates"
opt=$oldapp
elif [[ $type == "Custom" ]]; then
webyversion=$(wget --timeout=10 -t 1 -qO- https://api.webinoly.com/check?text=true)
opt=$ver
else
type="Error"
conf_write init-error-flag true
Expand Down

0 comments on commit 22bd822

Please sign in to comment.