| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- #!/bin/bash
- quiet=$1
- source $HESTIA/func/main.sh
- source $HESTIA/conf/hestia.conf
- welcome_message() {
- echo "********************************************************"
- echo "* Hestia Control Panel - User Interface Theme Updater *"
- echo "********************************************************"
- echo " This script will update the themes currently "
- echo " available on your system, which may include bug fixes "
- echo " and improvements from our development team which are "
- echo " intended to provide a user better experience "
- echo "********************************************************"
- echo " Proceed with theme update installation? "
- echo " [Y/n] "
- echo ""
- }
- if [ "$quiet" ]; then
- answer="y"
- else
- welcome_message
- read -p "" answer
- fi
- if [ "$answer" = "y" ] || [ "$answer" = "Y" ] || [ "$answer" = "yes" ]; then
- echo ""
- echo "Updating system base theme..."
- if [ -e "$HESTIA/web/css/styles.min.css" ]; then
- rm -f "$HESTIA/web/css/styles.min.css"
- fi
- wget -O $HESTIA/web/css/styles.min.css $HESTIA_GIT_REPO/$RELEASE_BRANCH/web/css/styles.min.css --show-progress --progress=bar:force --limit-rate=3m
- echo "Updating included themes..."
- for themefile in `ls $HESTIA/install/deb/themes`; do
- if [ -e $themefile ]; then
- rm -f $themefile
- fi
- echo "Downloading $themefile..."
- wget -O $HESTIA_INSTALL_DIR/themes/$themefile $HESTIA_GIT_REPO/$RELEASE_BRANCH/install/deb/themes/$themefile --show-progress --progress=bar:force --limit-rate=3m
- done
- if [ "$THEME" != "default" ]; then
- echo "Applying updated system interface theme..."
- $BIN/v-change-sys-theme $THEME
- fi
- else
- echo "Update process aborted."
- fi
|