Files
Misc-Scripts/install-linupx.sh

44 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
if [ -d /opt/idssys/defaults ]; then
source /opt/idssys/defaults/colors.inc
source /opt/idssys/defaults/default.inc
else
source /dev/stdin <<< "$(curl -sL http://go.scity.us/colorsinc)"
source /dev/stdin <<< "$(curl -sL http://go.scity.us/defaultinc)"
fi
if [ "$EUID" -ne 0 ]; then APTFUNC="sudo ${ATYPE}"
else APTFUNC="${ATYPE}"
fi
echo ""
echo -e "${idsCL[LightGreen]}LinUPx Installation Script${idsCL[Default]}"
do_with_root $APTFUNC -y install wget curl git jq grepcidr
do_with_root set -eu
do_with_root git clone https://git.schroedercity.com/voltron/LinUPx.git /opt/idssys/linupx
if [ -d /usr/local/bin/ ]; then
do_with_root ln -s /opt/idssys/linupx/run.sh /usr/local/bin/runup
elif [ -d /bin/ ]; then
do_with_root ln -s /opt/idssys/linupx/run.sh /bin/runup
fi
if [ ! -d "/opt/idssys/defaults" ]; then
do_with_root set -eu
do_with_root git clone https://git.schroedercity.com/voltron/iDS-Defaults.git /opt/idssys/defaults
fi
echo -e "useAutoremove=1
opennms=false
" > /opt/idssys/linupx/settings.conf
echo ""
echo -e "${idsCL[Yellow]}LinUPx has been Installed${idsCL[Default]}"
echo ""
echo -e "To run updates, use the command: ${idsCL[Green]}runup${idsCL[Default]}"
echo ""
echo ""
exit 0