This commit is contained in:
2023-08-28 19:50:38 -05:00
parent 48a1d8c247
commit 863c12d97d
2 changed files with 19 additions and 4 deletions

View File

@@ -3,7 +3,7 @@
action="$1"
FOLDER='/opt/idssys/linupx'
VERS='6.48-08282023'
VERS='6.49-08282023'
if [ -d /opt/idssys/settings ]; then
[ $(ls /opt/idssys/settings | wc -l) -eq 0 ] && rm -rf /opt/idssys/settings
@@ -667,7 +667,8 @@ COPYCERTS_UPDATE(){
/usr/bin/ssh-copy-id le@keepalived.scity.us
# /bin/sed -i 's/le@keepalived.scity.us\:\/opt\/nginx-proxy\/ssl/le@keepalived.scity.us\:\/opt\/lb-data\/letsencrypt\/live/g' /opt/copycerts.sh
/bin/sed -i 's/opt\/lb-data\/letsencrypt/etc\/letsencrypt/g' /opt/copycerts.sh
/opt/copycerts.sh
crontab -l | grep '/opt/copycerts.sh' | grep -q -v '#' && /opt/copycerts.sh
echo
echo -e "${idsCL[Green]}copycerts.sh has been updated${idsCL[Default]}"

18
run.sh
View File

@@ -14,7 +14,11 @@ if curl -m 5 -s --head --request GET https://git.schroedercity.com | grep "HTTP
if [ "${1}" != "runup" ]; then
cd /opt/idssys/defaults
if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then
if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then
if [ "${1}" != "runup" ]; then
echo -en "\e[1A";
echo -e "${idsCL[LightCyan]}Updating iDSSYS-Defaults...${idsCL[Default]}"
fi
git fetch origin master >/dev/null 2>&1
git reset --hard origin/master >/dev/null 2>&1
git reflog expire --expire=now --all >/dev/null 2>&1
@@ -29,13 +33,23 @@ if curl -m 5 -s --head --request GET https://git.schroedercity.com | grep "HTTP
cd /opt/idssys/linupx
fi
if [ "$1" != "update" ] && [ "$1" != "up" ]; then
if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then
if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then
if [ "${1}" != "runup" ]; then
echo -en "\e[1A";
echo -e "\e[0K\r ${idsCL[LightCyan]}Updating LinUPx...${idsCL[Default]}"
fi
git fetch origin master >/dev/null 2>&1
git reset --hard origin/master >/dev/null 2>&1
git reflog expire --expire=now --all >/dev/null 2>&1
git repack -ad >/dev/null 2>&1
git prune >/dev/null 2>&1
git pull >/dev/null 2>&1
if [ "${1}" != "runup" ]; then
echo -en "\e[1A";
echo -e "\e[0K\r ${idsCL[Green]}Updated to v${VERS}${idsCL[Default]}"
fi
fi
fi
if [ "${1}" != "runup" ]; then