From 9f40d570571fc3a5378d057c9f9cc35b3a5dcf33 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 15 Mar 2022 08:25:40 -0400 Subject: [PATCH] Create dashy-update.sh --- misc/dashy-update.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 misc/dashy-update.sh diff --git a/misc/dashy-update.sh b/misc/dashy-update.sh new file mode 100644 index 00000000..531ec581 --- /dev/null +++ b/misc/dashy-update.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +set -e +RD=`echo "\033[01;31m"` +BL=`echo "\033[36m"` +CM='\xE2\x9C\x94\033' +GN=`echo "\033[1;92m"` +CL=`echo "\033[m"` +clear +echo -en "${GN} Stopping Dashy... " +systemctl stop dashy +echo -e "${CM}${CL} \r" + +echo -en "${GN} Backup Data... " +cp -R /dashy/public public-backup +echo -e "${CM}${CL} \r" + +echo -en "${GN} Updating Dashy... " +git merge +git pull origin master +yarn +yarn build +echo -e "${CM}${CL} \r" + +echo -en "${GN} Restoring Data... " +cp -R public-backup/* /dashy/public +echo -e "${CM}${CL} \r" + +echo -en "${GN} Cleaning... " +rm -rf public-backup +echo -e "${CM}${CL} \r" + +echo -en "${GN} Starting Dashy... " +systemctl start dashy +echo -e "${CM}${CL} \r" + +echo -e "${GN} Finished ${CL}\n"