#!/usr/bin/env bash case "$1" in upgrade) [ -d /run/systemd/system/ ] && systemctl stop sheepit exit 0 ;; *) [ -d /run/systemd/system/ ] && systemctl stop sheepit [ -d /run/systemd/system/ ] && systemctl disable sheepit exit 0 ;; esac