|
@@ -6,20 +6,19 @@
|
|
|
#
|
|
#
|
|
|
# Replace Hestia logos with User created logo's
|
|
# Replace Hestia logos with User created logo's
|
|
|
|
|
|
|
|
-download=${1-no}
|
|
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
# Variables & Functions #
|
|
# Variables & Functions #
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
# Argument definition
|
|
# Argument definition
|
|
|
-restart=$1
|
|
|
|
|
-skip=$2
|
|
|
|
|
|
|
+download=${1-no}
|
|
|
|
|
+reset=${2-no}
|
|
|
|
|
|
|
|
# Includes
|
|
# Includes
|
|
|
# shellcheck source=/etc/hestiacp/hestia.conf
|
|
# shellcheck source=/etc/hestiacp/hestia.conf
|
|
|
source /etc/hestiacp/hestia.conf
|
|
source /etc/hestiacp/hestia.conf
|
|
|
# shellcheck source=/usr/local/hestia/func/main.sh
|
|
# shellcheck source=/usr/local/hestia/func/main.sh
|
|
|
-source $HESTIA/func/main.sh
|
|
|
|
|
|
|
+source "$HESTIA/func/main.sh"
|
|
|
# load config file
|
|
# load config file
|
|
|
source_conf "$HESTIA/conf/hestia.conf"
|
|
source_conf "$HESTIA/conf/hestia.conf"
|
|
|
|
|
|
|
@@ -27,34 +26,38 @@ source_conf "$HESTIA/conf/hestia.conf"
|
|
|
# Action #
|
|
# Action #
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
|
|
+if [ "$reset" = "yes" ]; then
|
|
|
|
|
+ rm -rf "$HESTIA/web/images/custom/"
|
|
|
|
|
+fi
|
|
|
|
|
+
|
|
|
if [ -f "$HESTIA/web/images/custom/logo.svg" ]; then
|
|
if [ -f "$HESTIA/web/images/custom/logo.svg" ]; then
|
|
|
- cp -f $HESTIA/web/images/custom/logo.svg $HESTIA/web/images/logo.svg
|
|
|
|
|
|
|
+ cp -f "$HESTIA/web/images/custom/logo.svg" "$HESTIA/web/images/logo.svg"
|
|
|
elif [ ! -f "$HESTIA/web/images/custom/logo.svg" ] && [ "$download" = "yes" ]; then
|
|
elif [ ! -f "$HESTIA/web/images/custom/logo.svg" ] && [ "$download" = "yes" ]; then
|
|
|
- download_file https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/images/logo.svg $HESTIA/web/images/logo.svg
|
|
|
|
|
|
|
+ download_file "https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/images/logo.svg" "$HESTIA/web/images/logo.svg"
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
if [ -f "$HESTIA/web/images/custom/logo.png" ]; then
|
|
if [ -f "$HESTIA/web/images/custom/logo.png" ]; then
|
|
|
- cp -f $HESTIA/web/images/custom/logo.png $HESTIA/web/images/logo.png
|
|
|
|
|
|
|
+ cp -f $"HESTIA/web/images/custom/logo.png" "$HESTIA/web/images/logo.png"
|
|
|
elif [ ! -f "$HESTIA/web/images/custom/logo.png" ] && [ "$download" = "yes" ]; then
|
|
elif [ ! -f "$HESTIA/web/images/custom/logo.png" ] && [ "$download" = "yes" ]; then
|
|
|
- download_file https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/images/logo.png $HESTIA/web/images/logo.png
|
|
|
|
|
|
|
+ download_file "https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/images/logo.png" "$HESTIA/web/images/logo.png"
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
if [ -f "$HESTIA/web/images/custom/logo-header.svg" ]; then
|
|
if [ -f "$HESTIA/web/images/custom/logo-header.svg" ]; then
|
|
|
- cp -f $HESTIA/web/images/custom/logo-header.svg $HESTIA/web/images/logo-header.svg
|
|
|
|
|
|
|
+ cp -f "$HESTIA/web/images/custom/logo-header.svg" "$HESTIA/web/images/logo-header.svg"
|
|
|
elif [ ! -f "$HESTIA/web/images/custom/logo-header.svg" ] && [ "$download" = "yes" ]; then
|
|
elif [ ! -f "$HESTIA/web/images/custom/logo-header.svg" ] && [ "$download" = "yes" ]; then
|
|
|
- download_file https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/images/logo-header.svg $HESTIA/web/images/logo-header.svg
|
|
|
|
|
|
|
+ download_file "https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/images/logo-header.svg" "$HESTIA/web/images/logo-header.svg"
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
if [ -f "$HESTIA/web/images/custom/favicon.png" ]; then
|
|
if [ -f "$HESTIA/web/images/custom/favicon.png" ]; then
|
|
|
- cp -f $HESTIA/web/images/custom/favicon.png $HESTIA/web/images/favicon.png
|
|
|
|
|
|
|
+ cp -f" $HESTIA/web/images/custom/favicon.png" "$HESTIA/web/images/favicon.png"
|
|
|
elif [ ! -f "$HESTIA/web/images/custom/favicon.png" ] && [ "$download" = "yes" ]; then
|
|
elif [ ! -f "$HESTIA/web/images/custom/favicon.png" ] && [ "$download" = "yes" ]; then
|
|
|
- download_file https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/images/favicon.png $HESTIA/web/images/favicon.png
|
|
|
|
|
|
|
+ download_file "https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/images/favicon.png" "$HESTIA/web/images/favicon.png"
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
if [ -f "$HESTIA/web/images/custom/favicon.ico" ]; then
|
|
if [ -f "$HESTIA/web/images/custom/favicon.ico" ]; then
|
|
|
- cp -f $HESTIA/web/images/custom/favicon.ico $HESTIA/web/favicon.ico
|
|
|
|
|
|
|
+ cp -f "$HESTIA/web/images/custom/favicon.ico" "$HESTIA/web/favicon.ico"
|
|
|
elif [ ! -f "$HESTIA/web/images/custom/favicon.ico" ] && [ "$download" = "yes" ]; then
|
|
elif [ ! -f "$HESTIA/web/images/custom/favicon.ico" ] && [ "$download" = "yes" ]; then
|
|
|
- download_file https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/favicon.ico $HESTIA/web/favicon.ico
|
|
|
|
|
|
|
+ download_file "https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/favicon.ico" "$HESTIA/web/favicon.ico"
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|