#!/bin/bash set -e # Stop and disable service before removal if systemctl is-active --quiet scron; then systemctl stop scron fi if systemctl is-enabled --quiet scron; then systemctl disable scron fi