Added fixes for rpm based system usage

This commit is contained in:
Alexey Berezhok
2024-04-14 22:48:16 +03:00
parent 68a01be7c3
commit 8bcf0d1d01
46 changed files with 351 additions and 118 deletions

View File

@@ -93,17 +93,20 @@ fi
# Deleting Hestia IP
rm -f $HESTIA/data/ips/$ip
confd=$(get_conf_d_name "$WEB_SYSTEM")
pconfd=$(get_conf_d_name "$PROXY_SYSTEM")
# Deleting web config
if [ -n "$WEB_SYSTEM" ]; then
rm -f /etc/$WEB_SYSTEM/conf.d/$ip.conf
rm -f /etc/$WEB_SYSTEM/$confd/$ip.conf
fi
# Deleting proxy config
if [ -n "$PROXY_SYSTEM" ]; then
rm -f /etc/$PROXY_SYSTEM/conf.d/$ip.conf
rm -f /etc/$PROXY_SYSTEM/$pconfd/$ip.conf
# mod_extract_forwarded
fw_conf="/etc/$WEB_SYSTEM/conf.d/mod_extract_forwarded.conf"
fw_conf="/etc/$WEB_SYSTEM/$pconfd/mod_extract_forwarded.conf"
if [ -e "$fw_conf" ]; then
ips="$(grep 'MEFaccept 127.0.0.1' "$fw_conf")"
new_ips="$(echo "$ips" | sed "s/$ip//")"