update
This commit is contained in:
17
defaults.inc
Executable file
17
defaults.inc
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
action="$1"
|
||||
FOLDER='/opt/idssys/linupx'
|
||||
VERS='6.60.1-08282023'
|
||||
|
||||
[ "$(dpkg-query -W --showformat='${Status}\n' grepcidr | grep "install ok installed")" == "" ] && sudo ${APTFUNC} -y install grepcidr >/dev/null 2>&1
|
||||
|
||||
Color_Off='\033[0m'
|
||||
Blue='\033[0;34m'
|
||||
BBlue='\033[1;34m'
|
||||
Green='\033[0;32m'
|
||||
LGreen='\033[1;32m'
|
||||
BOrange='\033[0;33m'
|
||||
DGray='\033[1;30m'
|
||||
Red='\033[10;31m'
|
||||
LRed='\033[1;31m'
|
||||
@@ -1,58 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
# LinUPx - Linux Update Scripts
|
||||
|
||||
action="$1"
|
||||
FOLDER='/opt/idssys/linupx'
|
||||
VERS='6.51-08282023'
|
||||
|
||||
if [ -d /opt/idssys/settings ]; then
|
||||
[ $(ls /opt/idssys/settings | wc -l) -eq 0 ] && rm -rf /opt/idssys/settings
|
||||
fi
|
||||
|
||||
if [ -d /opt/idssys/LinUPx ]; then
|
||||
mv /opt/LinUPx /opt/idssys/linupx
|
||||
rm -f /usr/local/bin/runup
|
||||
ln -s /opt/idssys/linupx/run.sh /usr/local/bin/runup
|
||||
echo "Program has been updated, please re-run"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ ! -d "/opt/idssys/linupx" ]; then
|
||||
if [ ! -d /opt/idssys ]; then
|
||||
mkdir /opt/idssys
|
||||
fi
|
||||
mv /opt/LinUPx /opt/idssys/linupx
|
||||
rm -f /usr/local/bin/runup
|
||||
ln -s /opt/idssys/linupx/run.sh /usr/local/bin/runup
|
||||
echo "Program has been updated, please re-run"
|
||||
exit 0
|
||||
fi
|
||||
if [ ! -d "/opt/idssys/defaults" ]; then
|
||||
set -eu
|
||||
git clone https://git.schroedercity.com/voltron/iDS-Defaults.git /opt/idssys/defaults
|
||||
fi
|
||||
|
||||
[ "$(dpkg-query -W --showformat='${Status}\n' grepcidr | grep "install ok installed")" == "" ] && sudo ${APTFUNC} -y install grepcidr >/dev/null 2>&1
|
||||
|
||||
|
||||
source /opt/idssys/linupx/settings.conf
|
||||
source /opt/idssys/defaults/colors.inc
|
||||
source /opt/idssys/defaults/default.inc
|
||||
source /opt/idssys/linupx/settings.conf
|
||||
source /opt/idssys/linupx/defaults.inc
|
||||
|
||||
|
||||
[ -z ${useAutoremove+x} ] && echo -e "useAutoremove=1" >> /opt/idssys/linupx/settings.conf && source /opt/idssys/linupx/settings.conf
|
||||
|
||||
|
||||
Color_Off='\033[0m'
|
||||
Blue='\033[0;34m'
|
||||
BBlue='\033[1;34m'
|
||||
Green='\033[0;32m'
|
||||
LGreen='\033[1;32m'
|
||||
BOrange='\033[0;33m'
|
||||
DGray='\033[1;30m'
|
||||
Red='\033[10;31m'
|
||||
LRed='\033[1;31m'
|
||||
|
||||
|
||||
|
||||
UPDATE1() {
|
||||
if [ "$opennms" = true ]; then
|
||||
|
||||
6
run.sh
6
run.sh
@@ -3,8 +3,10 @@
|
||||
|
||||
[ -f /opt/idssys/settings/linupx.conf ] && mv /opt/idssys/settings/linupx.conf /opt/idssys/linupx/settings.conf
|
||||
|
||||
source /opt/idssys/linupx/settings.conf
|
||||
source /opt/idssys/defaults/colors.inc
|
||||
source /opt/idssys/defaults/default.inc
|
||||
source /opt/idssys/linupx/settings.conf
|
||||
source /opt/idssys/linupx/defaults.inc
|
||||
|
||||
if curl -m 5 -s --head --request GET https://git.schroedercity.com | grep "HTTP/2 200" > /dev/null; then
|
||||
if [ "${1}" != "runup" ]; then
|
||||
@@ -46,7 +48,7 @@ if curl -m 5 -s --head --request GET https://git.schroedercity.com | grep "HTTP
|
||||
git pull >/dev/null 2>&1
|
||||
|
||||
if [ "${1}" != "runup" ]; then
|
||||
|
||||
source /opt/idssys/linupx/defaults.inc
|
||||
echo -en "\e[1A";
|
||||
echo -e "\e[0K\r ${idsCL[Green]}Updated to v${VERS}${idsCL[Default]}"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user