Update emulator-sync-scripts.sh

This commit is contained in:
2023-07-15 15:51:12 -05:00
parent e2183503f6
commit 9fd6899958

View File

@@ -6,7 +6,7 @@ source /opt/idssys/defaults/colors.inc
source /opt/idssys/defaults/default.inc
source /opt/idssys/emulator-sync/settings.conf
ESFOLDER=${ESFOLDER}
ESFOLDER=/opt/idssys/emulator-sync
SYNC_FOLDER="${ESFOLDER}/._sync_nextcloud"
[ ! -d ${SYNC_FOLDER} ] && mkdir ${SYNC_FOLDER}
@@ -19,6 +19,7 @@ $(date)" "${1}" ${3} &
}
RUNSYNC(){
[ -f ${ESFOLDER}/nc-sync.running ] && [ $(expr $(date +%s) - $(stat -L --format %Y ${ESFOLDER}/nc-sync.running)) -gt 21600 ] && /bin/rm -f ${ESFOLDER}/nc-sync.running
if [ ! -f ${ESFOLDER}/nc-sync.running ]; then
@@ -70,13 +71,14 @@ else
echo "There is a sync in process"
exit 0
fi
}
echo
echo -e "${idsCL[LightGreen]} Emulator-Nextcloud-Sync ${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}"
DIVIDER . lightGreen
echo
case ${1} in
sync) NEWCERT ${2};;
sync) RUNSYNC ${2};;
esac