desktop/zramswap/zramswap.install

18 lines
483 B
Plaintext
Raw Normal View History

2014-10-29 07:25:22 +08:00
post_install() {
2014-10-29 07:34:37 +08:00
echo "==> To enable zramswap, run 'sudo systemctl enable zramswap.service'"
echo "==> To run the script now, start it with 'sudo systemctl start zramswap.service'"
2014-10-29 07:25:22 +08:00
}
pre_remove() {
# Stop running services
2014-10-29 07:34:37 +08:00
_service="zramswap.service"
2014-10-29 07:25:22 +08:00
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
}