Skip to content

Commit 794d9f0

Browse files
authored
Merge pull request hestiacp#1037 from Lupul/fix-200731
Fix-200731
2 parents 26f629d + f9749a9 commit 794d9f0

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

bin/v-add-firewall-ipset

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ if [ ! -f "${IPSET_PATH}/${IPSET_FILE}.iplist" ] || [ "$force" = "yes" ]; then
8989
# Advanced: execute script with the same basename for aditional pre-processing
9090
# ex:
9191
if [ -x "${IPSET_PATH}/${IPSET_FILE}.sh" ]; then
92-
setpriv --clear-groups --reuid nobody --regid nogroup -- ${IPSET_PATH}/${IPSET_FILE}.sh "$ip_name" "$iplist_tempfile"
92+
preprocess_output="$(cat "$iplist_tempfile" | setpriv --clear-groups --reuid nobody --regid nogroup -- ${IPSET_PATH}/${IPSET_FILE}.sh "$ip_name" "$iplist_tempfile")"
93+
check_result $? "Preprocessing script failed (${IPSET_FILE}.sh)"
94+
[[ "$preprocess_output" ]] && echo "$preprocess_output" > "$iplist_tempfile"
9395
fi
9496

9597
elif [[ "$data_source" =~ ^script:/ ]]; then

bin/v-add-letsencrypt-host

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
#----------------------------------------------------------#
1212

1313
# Argument definition
14-
user="admin"
1514
domain=$HOSTNAME
15+
user="$($HESTIA/bin/v-search-domain-owner "$domain" web)"
16+
[[ -z "$user" ]] && user="admin"
1617

1718
# Includes
1819
source $HESTIA/func/main.sh

0 commit comments

Comments
 (0)