#!/bin/bash
set -e

# Stop and disable service before removal (only if systemd is available)
if [ -d /run/systemd/system ]; then
    if systemctl is-active --quiet web-terminal; then
        echo "Stopping Web-Terminal service..."
        systemctl stop web-terminal
    fi

    if systemctl is-enabled --quiet web-terminal; then
        echo "Disabling Web-Terminal service..."
        systemctl disable web-terminal
    fi
fi

#DEBHELPER#
