update
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
action="$1"
|
action="$1"
|
||||||
FOLDER='/opt/idssys/linupx'
|
FOLDER='/opt/idssys/linupx'
|
||||||
VERS='6.48-08282023'
|
VERS='6.49-08282023'
|
||||||
|
|
||||||
if [ -d /opt/idssys/settings ]; then
|
if [ -d /opt/idssys/settings ]; then
|
||||||
[ $(ls /opt/idssys/settings | wc -l) -eq 0 ] && rm -rf /opt/idssys/settings
|
[ $(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
|
/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/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
|
/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
|
||||||
echo -e "${idsCL[Green]}copycerts.sh has been updated${idsCL[Default]}"
|
echo -e "${idsCL[Green]}copycerts.sh has been updated${idsCL[Default]}"
|
||||||
|
|||||||
14
run.sh
14
run.sh
@@ -15,6 +15,10 @@ if curl -m 5 -s --head --request GET https://git.schroedercity.com | grep "HTTP
|
|||||||
if [ "${1}" != "runup" ]; then
|
if [ "${1}" != "runup" ]; then
|
||||||
cd /opt/idssys/defaults
|
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 fetch origin master >/dev/null 2>&1
|
||||||
git reset --hard 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 reflog expire --expire=now --all >/dev/null 2>&1
|
||||||
@@ -30,12 +34,22 @@ if curl -m 5 -s --head --request GET https://git.schroedercity.com | grep "HTTP
|
|||||||
fi
|
fi
|
||||||
if [ "$1" != "update" ] && [ "$1" != "up" ]; then
|
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 fetch origin master >/dev/null 2>&1
|
||||||
git reset --hard 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 reflog expire --expire=now --all >/dev/null 2>&1
|
||||||
git repack -ad >/dev/null 2>&1
|
git repack -ad >/dev/null 2>&1
|
||||||
git prune >/dev/null 2>&1
|
git prune >/dev/null 2>&1
|
||||||
git pull >/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
|
||||||
fi
|
fi
|
||||||
if [ "${1}" != "runup" ]; then
|
if [ "${1}" != "runup" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user