remove old checks from update script
@@ -41,12 +41,6 @@ if [ "$ORIGUSER" != "$USER" ]; then
exit 1
fi
-CHECK_TOO_OLD=$(grep natsapi /etc/nginx/sites-available/rmm.conf)
-if ! [[ $CHECK_TOO_OLD ]]; then
- printf >&2 "${RED}Your version of TRMM is no longer supported. Refusing to update.${NC}\n"
- exit 1
-fi
-
TMP_SETTINGS=$(mktemp -p "" "rmmsettings_XXXXXXXXXX")
curl -s -L "${LATEST_SETTINGS_URL}" > ${TMP_SETTINGS}
SETTINGS_FILE="/rmm/api/tacticalrmm/tacticalrmm/settings.py"
@@ -68,28 +62,10 @@ NATS_SERVER_VER=$(grep "^NATS_SERVER_VER" "$TMP_SETTINGS" | awk -F'[= "]' '{prin
CURRENT_PIP_VER=$(grep "^PIP_VER" "$SETTINGS_FILE" | awk -F'[= "]' '{print $5}')
CURRENT_NPM_VER=$(grep "^NPM_VER" "$SETTINGS_FILE" | awk -F'[= "]' '{print $5}')
-
-if [ -f /etc/systemd/system/natsapi.service ]; then
- printf >&2 "${GREEN}Removing natsapi.service${NC}\n"
- sudo systemctl stop natsapi.service
- sudo systemctl disable natsapi.service
- sudo rm -f /etc/systemd/system/natsapi.service
- sudo systemctl daemon-reload
-fi
-
cls() {
printf "\033c"
}
-CHECK_HAS_DAPHNE=$(grep daphne.sock /etc/nginx/sites-available/rmm.conf)
-if ! [[ $CHECK_HAS_DAPHNE ]]; then
- cls
- echo -ne "${RED}Nginx config changes required before continuing.${NC}\n"
- echo -ne "${RED}Please check the v0.5.0 release notes on github for instructions, then re-run this script.${NC}\n"
- echo -ne "${YELLOW}https://github.com/wh1te909/tacticalrmm/releases/tag/v0.5.0${NC}\n"
- echo -ne "${RED}Aborting...${NC}\n"
- exit 1
-fi
if ! sudo nginx -t > /dev/null 2>&1; then
sudo nginx -t
@@ -99,30 +75,6 @@ if ! sudo nginx -t > /dev/null 2>&1; then
exit 1
fi
-if ! [ -f /etc/systemd/system/daphne.service ]; then
-daphneservice="$(cat << EOF
-[Unit]
-Description=django channels daemon
-After=network.target
-
-[Service]
-User=${USER}
-Group=www-data
-WorkingDirectory=/rmm/api/tacticalrmm
-Environment="PATH=/rmm/api/env/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
-ExecStart=/rmm/api/env/bin/daphne -u /rmm/daphne.sock tacticalrmm.asgi:application
-Restart=always
-RestartSec=3s
-
-[Install]
-WantedBy=multi-user.target
-EOF
-)"
-echo "${daphneservice}" | sudo tee /etc/systemd/system/daphne.service > /dev/null
-sudo systemctl daemon-reload
-sudo systemctl enable daphne.service
-fi
-
if [ ! -f /etc/systemd/system/nats-api.service ]; then
natsapi="$(cat << EOF
[Unit]
