update
This commit is contained in:
11
defaults.inc
11
defaults.inc
@@ -41,3 +41,14 @@ DEBUGLOGSTOP(){
|
|||||||
chktm=$((chktmend-chktmstart))
|
chktm=$((chktmend-chktmstart))
|
||||||
echo "$(date) - ${mmsv} Runtime: ${chktm}s" >> $logfile
|
echo "$(date) - ${mmsv} Runtime: ${chktm}s" >> $logfile
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MMUPDATECHECK(){
|
||||||
|
if curl -m 15 -s --head --request GET https://git.schroedercity.com | grep "HTTP/2 200" > /dev/null; then
|
||||||
|
cd ${MMFOLDER}
|
||||||
|
if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then
|
||||||
|
touch ${MMFOLDER}/update.available
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
/bin/rm -f ${MMFOLDER}/update.available
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|||||||
@@ -306,12 +306,7 @@ PersistentKeepalive = 25" >> /etc/wireguard/wg-torguard.conf
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
|
|
||||||
if [ "${1}" == "check" ] && [ "$(date +%M)" == "15" ]; then
|
|
||||||
MMUPDATECHECK
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
[ $VERBOSE = true ] && DEBUGLOGSTOP
|
[ $VERBOSE = true ] && DEBUGLOGSTOP
|
||||||
|
|
||||||
@@ -490,17 +485,6 @@ MMSTATUS(){
|
|||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
MMUPDATECHECK(){
|
|
||||||
if curl -m 15 -s --head --request GET https://git.schroedercity.com | grep "HTTP/2 200" > /dev/null; then
|
|
||||||
cd ${MMFOLDER}
|
|
||||||
if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then
|
|
||||||
touch ${MMFOLDER}/update.available
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
/bin/rm -f ${MMFOLDER}/update.available
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ ! -f ${MMFOLDER}/mm.update.stop ]; then
|
if [ ! -f ${MMFOLDER}/mm.update.stop ]; then
|
||||||
if [ -f ${MMFOLDER}/mm.stop ]; then
|
if [ -f ${MMFOLDER}/mm.stop ]; then
|
||||||
stoppedsince=`date +%s`-$(stat -c %Y ${MMFOLDER}/mm.stop)
|
stoppedsince=`date +%s`-$(stat -c %Y ${MMFOLDER}/mm.stop)
|
||||||
|
|||||||
4
run.sh
4
run.sh
@@ -11,6 +11,10 @@ else
|
|||||||
source ${MMFOLDER}/settings.conf
|
source ${MMFOLDER}/settings.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ([ "${1}" == "check" ] && [ "$(date +%M)" == "15" ]) || [ "${1}" == "" ]; then
|
||||||
|
MMUPDATECHECK
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${1}" == "update" ]; then
|
if [ "${1}" == "update" ]; then
|
||||||
if curl -m 15 -s --head --request GET https://git.schroedercity.com | grep "HTTP/2 200" > /dev/null; then
|
if curl -m 15 -s --head --request GET https://git.schroedercity.com | grep "HTTP/2 200" > /dev/null; then
|
||||||
if [ "${2}" != "q" ]; then
|
if [ "${2}" != "q" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user