Small fixes after testing.
This commit is contained in:
Cristhian Martínez Ochoa 2023-05-30 16:15:21 -07:00
parent 2709ad9f6d
commit 059456ee19
2 changed files with 4 additions and 1 deletions

View file

@ -1940,11 +1940,12 @@ help_message() {
ads_donate() {
# Donations message displayed once a day!
# Note: Don't run when stdout is redirected to /dev/null: https://unix.stackexchange.com/questions/484228/how-to-check-if-stdin-is-dev-null-from-the-shell
if [[ -z $(conf_read cron-ads) && -n $EPOCHSECONDS ]]; then
conf_write cron-ads $EPOCHSECONDS
elif ! [[ $(conf_read cron-ads) =~ ^[0-9]+$ ]] || [[ $(conf_read cron-ads) -gt $EPOCHSECONDS ]]; then # Autofix! (Just in case!)
conf_write cron-ads $EPOCHSECONDS
elif [[ -n $EPOCHSECONDS && -n $(conf_read cron-ads) && $(($EPOCHSECONDS-$(conf_read cron-ads))) -gt 86400 ]]; then
elif [[ -n $EPOCHSECONDS && -n $(conf_read cron-ads) && $(($EPOCHSECONDS-$(conf_read cron-ads))) -gt 86400 ]] && ! [[ /dev/stdout -ef /dev/null ]]; then
echo "${blu}"
echo "****************************************************************************"
echo "******************** ${bol}Are you enjoying Webinoly?${end}${blu} ********************"

View file

@ -878,6 +878,7 @@ stack_builder() {
fi
# PPA's
api-events_update iks
if [[ $1 == "nginx" && $(conf_read nginx) != "true" ]]; then
[[ $nginx =~ ^(stable|mainline)$ ]] && conf_write nginx-ppa $nginx
[[ $lemp =~ ^(stable|mainline)$ ]] && conf_write nginx-ppa $lemp
@ -973,6 +974,7 @@ stack_builder() {
echo "${dim}MySQL/MariaDB Client is already installed!${end}"
local code="run"
fi
api-events_update ike
# Exit before update!
# Don't run the "update" if nothing will be installed!