|
| 1 | +#!/bin/bash |
| 2 | +# info: update white label logo's |
| 3 | +# options: [DOWNLOAD] |
| 4 | +# |
| 5 | +# example: v-update-white-label-logo |
| 6 | +# |
| 7 | +# Replace Hestia logos with User created logo's |
| 8 | + |
| 9 | +download=${1-no} |
| 10 | +#----------------------------------------------------------# |
| 11 | +# Variables & Functions # |
| 12 | +#----------------------------------------------------------# |
| 13 | + |
| 14 | +# Argument definition |
| 15 | +restart=$1 |
| 16 | +skip=$2 |
| 17 | + |
| 18 | +# Includes |
| 19 | +# shellcheck source=/etc/hestiacp/hestia.conf |
| 20 | +source /etc/hestiacp/hestia.conf |
| 21 | +# shellcheck source=/usr/local/hestia/func/main.sh |
| 22 | +source $HESTIA/func/main.sh |
| 23 | +# load config file |
| 24 | +source_conf "$HESTIA/conf/hestia.conf" |
| 25 | + |
| 26 | +#----------------------------------------------------------# |
| 27 | +# Action # |
| 28 | +#----------------------------------------------------------# |
| 29 | + |
| 30 | +if [ -f "$HESTIA/web/images/custom/logo.svg" ]; then |
| 31 | + cp -f $HESTIA/web/images/custom/logo.svg $HESTIA/web/images/logo.svg |
| 32 | +elif [ ! -f "$HESTIA/web/images/custom/logo.svg" ] && [ "$download" = "yes" ]; then |
| 33 | + download_file https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/images/logo.svg $HESTIA/web/images/logo.svg |
| 34 | +fi |
| 35 | + |
| 36 | +if [ -f "$HESTIA/web/images/custom/logo.png" ]; then |
| 37 | + cp -f $HESTIA/web/images/custom/logo.png $HESTIA/web/images/logo.png |
| 38 | +elif [ ! -f "$HESTIA/web/images/custom/logo.png" ] && [ "$download" = "yes" ]; then |
| 39 | + download_file https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/images/logo.png $HESTIA/web/images/logo.png |
| 40 | +fi |
| 41 | + |
| 42 | +if [ -f "$HESTIA/web/images/custom/logo-header.svg" ]; then |
| 43 | + cp -f $HESTIA/web/images/custom/logo-header.svg $HESTIA/web/images/logo-header.svg |
| 44 | +elif [ ! -f "$HESTIA/web/images/custom/logo-header.svg" ] && [ "$download" = "yes" ]; then |
| 45 | + download_file https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/images/logo-header.svg $HESTIA/web/images/logo-header.svg |
| 46 | +fi |
| 47 | + |
| 48 | +if [ -f "$HESTIA/web/images/custom/favicon.png" ]; then |
| 49 | + cp -f $HESTIA/web/images/custom/favicon.png $HESTIA/web/images/favicon.png |
| 50 | +elif [ ! -f "$HESTIA/web/images/custom/favicon.png" ] && [ "$download" = "yes" ]; then |
| 51 | + download_file https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/images/favicon.png $HESTIA/web/images/favicon.png |
| 52 | +fi |
| 53 | + |
| 54 | +if [ -f "$HESTIA/web/images/custom/favicon.ico" ]; then |
| 55 | + cp -f $HESTIA/web/images/custom/favicon.ico $HESTIA/web/favicon.ico |
| 56 | +elif [ ! -f "$HESTIA/web/images/custom/favicon.ico" ] && [ "$download" = "yes" ]; then |
| 57 | + download_file https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/favicon.ico $HESTIA/web/favicon.ico |
| 58 | +fi |
| 59 | + |
| 60 | +#----------------------------------------------------------# |
| 61 | +# Hestia # |
| 62 | +#----------------------------------------------------------# |
| 63 | + |
| 64 | +exit |
0 commit comments