update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
VERS='3.8.147-04232023'
|
||||
VERS='3.8.148-04232023'
|
||||
|
||||
MMFOLDER="/opt/idssys/mediamanager"
|
||||
MMSRV=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1)
|
||||
|
||||
@@ -814,11 +814,26 @@ UPDATESERVICE(){
|
||||
echo -e "${idsCL[Green]}Updating ${usrvc^} Service${idsCL[Default]}"
|
||||
DIVIDER . lightGreen
|
||||
|
||||
if [ "${usrvc}" == "organizr" ]; then
|
||||
msg="Updating Organizr"; c=0; spc=''; spc1=$((${cw_spc}-${#msg})); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -en "${idsCL[White]}${msg}${spc} : ${idsCL[Default]}"
|
||||
cd /var/www/media.scity.us/html >/dev/null 2>&1
|
||||
/usr/bin/git stash >/dev/null 2>&1
|
||||
/usr/bin/git pull >/dev/null 2>&1
|
||||
/bin/chown -Rf www-data:www-data /var/www/media.scity.us/html
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
|
||||
msg="Restarting NGINX"; c=0; spc=''; spc1=$((${cw_spc}-${#msg})); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -en "${idsCL[White]}${msg}${spc} : ${idsCL[Default]}"
|
||||
/bin/systemctl restart nginx >/dev/null 2>&1
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
|
||||
echo "$(date) - Updated Organizr" >> $logfile
|
||||
|
||||
else
|
||||
if [[ " ${UPDATE_SERVICES[*]} " =~ " ${usrvc} " ]]; then
|
||||
|
||||
msg="Stopping service and preparing"
|
||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
msg="Stopping service and preparing"; c=0; spc=''; spc1=$((${cw_spc}-${#msg})); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -en "${idsCL[White]}${msg}${spc} : ${idsCL[Default]}"
|
||||
|
||||
rm -f ${MMFOLDER}/logs/update.${usrvc}
|
||||
@@ -937,6 +952,7 @@ UPDATESERVICE(){
|
||||
echo -e "${idsCL[Red]}Not currently available to update${idsCL[Default]}"
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
else
|
||||
echo -e "${idsCL[Red]}No service selected for update${idsCL[Default]}"
|
||||
@@ -980,17 +996,6 @@ SHOWSRVCUPDATES(){
|
||||
|
||||
}
|
||||
|
||||
UPDATEORGANIZR(){
|
||||
echo -en "${idsCL[LightCyan]}Updating Organizr ... ${idsCL[Default]}"
|
||||
cd /var/www/media.scity.us/html >/dev/null 2>&1
|
||||
/usr/bin/git stash >/dev/null 2>&1
|
||||
/usr/bin/git pull >/dev/null 2>&1
|
||||
/bin/chown -Rf www-data:www-data /var/www/media.scity.us/html
|
||||
/bin/systemctl restart nginx >/dev/null 2>&1
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
echo "$(date) - Updated Organizr" >> $logfile
|
||||
}
|
||||
|
||||
MMSETUP(){
|
||||
echo -e "${idsCL[Green]}Media Manager Setup Scripts${idsCL[Default]}"
|
||||
echo
|
||||
@@ -1399,7 +1404,6 @@ if [ ! -f ${MMFOLDER}/mm.update.stop ]; then
|
||||
done
|
||||
;;
|
||||
update-list) SHOWSRVCUPDATES;;
|
||||
update-organizr) UPDATEORGANIZR;;
|
||||
clear) echo -e "${idsCL[LightCyan]}Clearing all mm.* files ${idsCL[Default]}"; echo;;
|
||||
*) USAGE;;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user