update
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
VERS='2.8.12-12012024'
|
VERS='2.8.12a-12012024'
|
||||||
|
|
||||||
noheader=' update service dailytemp confsync -r -report test '
|
noheader=' update service dailytemp confsync -r -report test '
|
||||||
|
|
||||||
@@ -13,6 +13,9 @@ PW_INCFOLDER=${PW_FOLDER}/inc
|
|||||||
PW_LOGFOLDER=${PW_FOLDER}/logs
|
PW_LOGFOLDER=${PW_FOLDER}/logs
|
||||||
PW_LOGARCHIVE=${PW_FOLDER}/logs/archive
|
PW_LOGARCHIVE=${PW_FOLDER}/logs/archive
|
||||||
PW_TMPFOLDER=${PW_FOLDER}/.tmp
|
PW_TMPFOLDER=${PW_FOLDER}/.tmp
|
||||||
|
NM_FOLDER='/opt/idssys/nodemgmt'
|
||||||
|
NM_TMPFOLDER=${NM_FOLDER}/.tmp
|
||||||
|
|
||||||
[ ! -d ${PW_INCFOLDER} ] && mkdir ${PW_INCFOLDER}
|
[ ! -d ${PW_INCFOLDER} ] && mkdir ${PW_INCFOLDER}
|
||||||
[ ! -d ${PW_LOGFOLDER} ] && mkdir ${PW_LOGFOLDER}
|
[ ! -d ${PW_LOGFOLDER} ] && mkdir ${PW_LOGFOLDER}
|
||||||
[ ! -d ${PW_LOGARCHIVE} ] && mkdir ${PW_LOGARCHIVE}
|
[ ! -d ${PW_LOGARCHIVE} ] && mkdir ${PW_LOGARCHIVE}
|
||||||
|
|||||||
12
powerwall.sh
12
powerwall.sh
@@ -744,16 +744,18 @@ GET_SNAPSHOTS(){
|
|||||||
|
|
||||||
CONFSYNC(){
|
CONFSYNC(){
|
||||||
[ "${PW_OFFSITE_MONITOR}" != "" ] && rsync -az --timeout=3 ${PW_FOLDER}/conf root@${PW_OFFSITE_MONITOR}:${PW_FOLDER}/ & >/dev/null 2>&1
|
[ "${PW_OFFSITE_MONITOR}" != "" ] && rsync -az --timeout=3 ${PW_FOLDER}/conf root@${PW_OFFSITE_MONITOR}:${PW_FOLDER}/ & >/dev/null 2>&1
|
||||||
if [ -f /opt/idssys/nodemgmt/conf/defaults.local.inc ]; then
|
if [ -f ${NM_FOLDER}/conf/defaults.local.inc ]; then
|
||||||
source /opt/idssys/nodemgmt/defaults.inc
|
source ${NM_FOLDER}/defaults.inc
|
||||||
rsync -az --timeout=3 ${PW_FOLDER}/conf/* root@${NM_NODEMANAGER}:/opt/idssys/nodemgmt/conf/powerwall/ & >/dev/null 2>&1
|
rsync -az --timeout=3 ${PW_FOLDER}/conf/* root@${NM_NODEMANAGER}:${NM_FOLDER}/conf/powerwall/ & >/dev/null 2>&1
|
||||||
# rsync -az --timeout=3 ${PW_FOLDER}/conf/settings.ps1 root@${NM_NODEMANAGER}:/opt/idssys/nodemgmt/conf/powerwall.settings.ps1 & >/dev/null 2>&1
|
# rsync -az --timeout=3 ${PW_FOLDER}/conf/settings.ps1 root@${NM_NODEMANAGER}:${NM_FOLDER}/conf/powerwall.settings.ps1 & >/dev/null 2>&1
|
||||||
|
else
|
||||||
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
UPDATE_TINYTUYA_SERVER(){
|
UPDATE_TINYTUYA_SERVER(){
|
||||||
TTS_FLDR=/opt/tinytuya-server
|
TTS_FLDR=/opt/tinytuya-server
|
||||||
if [ ! -f /opt/raspiBackup.running ]; then
|
if [ ! -f /opt/raspiBackup.running ] && ([ -f ${NM_TMPFOLDER}/.singleserver.PW2.primary ] || [ -f ${NM_TMPFOLDER}/.singleserver.PWO2.primary ]); then
|
||||||
if [ -d ${TTS_FLDR}/devices.json ]; then
|
if [ -d ${TTS_FLDR}/devices.json ]; then
|
||||||
docker stop tinytuya-server
|
docker stop tinytuya-server
|
||||||
rm -Rf ${TTS_FLDR}/devices.json
|
rm -Rf ${TTS_FLDR}/devices.json
|
||||||
|
|||||||
2
run.sh
2
run.sh
@@ -48,7 +48,7 @@ if [ "${1}" == "update" ]; then
|
|||||||
echo -en "\e[1A";
|
echo -en "\e[1A";
|
||||||
echo -e "\e[0K\r ${idsCL[Green]}Update to v${VERS} complete${idsCL[Default]}"
|
echo -e "\e[0K\r ${idsCL[Green]}Update to v${VERS} complete${idsCL[Default]}"
|
||||||
fi
|
fi
|
||||||
if [ ! -f /opt/idssys/nodemgmt/.tmp/.singleserver.PW.secondary ] && [ ! -f /opt/idssys/nodemgmt/.tmp/.singleserver.PWO.secondary ]; then
|
if [ ! -f ${NM_TMPFOLDER}/.singleserver.PW.secondary ] && [ ! -f ${NM_TMPFOLDER}/.singleserver.PWO.secondary ]; then
|
||||||
echo -en "${idsCL[LightCyan]}Do you want to restart PowerWall Services as well? (y/N): "
|
echo -en "${idsCL[LightCyan]}Do you want to restart PowerWall Services as well? (y/N): "
|
||||||
read -n 1 choice
|
read -n 1 choice
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
|
|||||||
Reference in New Issue
Block a user