post_install() { echo "==> To enable zramswap, run 'sudo systemctl enable zramswap.service'" echo "==> To run the script now, start it with 'sudo systemctl start zramswap.service'" } pre_remove() { # Stop running services _service="zramswap.service" systemctl is-active ${_service} &>/dev/null if [[ $? -eq 0 ]] ; then systemctl stop ${_service} fi systemctl is-enabled ${_service} &>/dev/null if [[ $? -eq 0 ]] ; then systemctl disable ${_service} fi }