Files
NodeMgmt/install.sh
2023-07-16 23:02:14 -05:00

34 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Wrapper script for install, for easier execution via URL.
source /dev/stdin <<< "$(curl -sL http://go.scity.us/colorsinc)"
source /dev/stdin <<< "$(curl -sL http://go.scity.us/defaultinc)"
echo -e "\n${idsCL[LightGreen]}NodeMgmt Installation Script${idsCL[Default]}"
$APTFUNC -y install wget curl git
set -eu
git clone https://git.schroedercity.com/voltron/NodeMgmt.git /opt/idssys/nodemgmt
ln -s /opt/idssys/nodemgmt/run.sh /usr/local/bin/nodemgmt
/bin/chmod +x /opt/idssys/nodemgmt/*.sh
if [ ! -d "/opt/idssys/defaults" ]; then
set -eu
git clone https://git.schroedercity.com/voltron/iDS-Defaults.git /opt/idssys/defaults
fi
echo -e "NODE_HOSTNAME=\"$(hostname)\"
#LOCAL_SERVICES=mysql,nginx,gitea,haproxy,keepalived,maxscale
#(optional)
# EMAIL_NOTICE=email@address.com
# PUSHOVER_APP_TOKEN=\"a2tk778mwe9b3tks1u16juas4rztjr\"
# PUSHOVER_USER_TOKEN=\"\"
" > /opt/idssys/nodemgmt/conf/settings.conf
echo -e "\n${idsCL[Yellow]}NodeMgmt has been Installed${idsCL[Default]}\n"
echo -e "To run, use the command: ${idsCL[Green]}nodemgmt${idsCL[Default]}\n\n"
exit 0