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

@@ -36,6 +36,9 @@ check_hestia_demo_mode
# Action #
#----------------------------------------------------------#
confd=$(get_conf_d_name "$WEB_SYSTEM")
pconfd=$(get_conf_d_name "$PROXY_SYSTEM")
# Listing system IP addresses
nics="$(ip -d -j link show | jq -r '.[] | if .link_type == "loopback" then empty else .ifname end')"
@@ -83,7 +86,7 @@ if [ -n "$old_ip" ]; then
# Updating PROXY
if [ -n "$PROXY_SYSTEM" ]; then
cd /etc/$PROXY_SYSTEM/conf.d
cd /etc/$PROXY_SYSTEM/$pconfd
if [ -e "$old_ip.conf" ]; then
mv $old_ip.conf $new_ip.conf
sed -i "s/$old_ip/$new_ip/g" $new_ip.conf
@@ -92,7 +95,7 @@ if [ -n "$old_ip" ]; then
# Updating WEB
if [ -n "$WEB_SYSTEM" ]; then
cd /etc/$WEB_SYSTEM/conf.d
cd /etc/$WEB_SYSTEM/$confd
if [ -e "$old_ip.conf" ]; then
mv $old_ip.conf $new_ip.conf