File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed
Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,9 @@ All notable changes to this project will be documented in this file.
1616- Fixed an error that would occur when running ` v-change-user-php-cli ` for the first time if .bash_aliases did not exist. (#960 )
1717- Corrected an issue where tooltips were not displayed when hovering over the top level menu items.
1818- Improved handling of APT repository keys during installation.
19-
20- ## [ 1.2.1] - Service Release 1
19+ - Reworked the Let's Encrypt renew functionality to skip removed aliases.
20+
21+ ## [ 1.2.1] - Service Release
2122### Features
2223- Consolidated First and Last Name fields to a singular name field to simply input.
2324 - v-change-user-name will now accept both "First Last" (single argument) and First Last (two arguments) for backward compatibility.
Original file line number Diff line number Diff line change @@ -58,6 +58,27 @@ for user in $($HESTIA/bin/v-list-sys-users plain); do
5858 aliases=$( echo " $aliases " | tr ' ' ' \n' | sed " /^$/d" )
5959 aliases=$( echo " $aliases " | egrep -v " ^$domain ,?$" )
6060 aliases=$( echo " $aliases " | sed -e ' :a;N;$!ba;s/\n/,/g' )
61+
62+ # Source domain.conf
63+ source <( cat $HESTIA /data/users/$user /web.conf | grep " DOMAIN='$domain '" )
64+
65+ # Split aliases into array
66+ IFS=' ,' read -r -a ALIASES <<< " $ALIAS"
67+
68+ # Loop through all crt aliases
69+ for alias in ${aliases// ,/ } ; do
70+ # Validate if the alias still exists in web.conf
71+ if [[ " ${ALIASES[@]} " =~ " ${alias} " ]]; then
72+ f_aliases+=" $alias ,"
73+ fi
74+ done
75+
76+ # Remove leading comma
77+ if [[ ${f_aliases: -1} = ' ,' ]] ; then f_aliases=${f_aliases::- 1} ; fi
78+
79+ # Write the filtered alias list to the default var
80+ aliases=$f_aliases
81+
6182 msg=$( $BIN /v-add-letsencrypt-domain $user $domain $aliases )
6283 if [ $? -ne 0 ]; then
6384 log_event $E_INVALID " $domain $msg "
114135# No Logging
115136# log_event "$OK" "$EVENT"
116137
117- exit
138+ exit
You can’t perform that action at this time.
0 commit comments