slackbuilds_ponce/system/zramen/rc.zramen
Hunter Ellett c94976824d
system/zramen: Added (Manage zram swap space).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2023-12-13 01:48:16 +07:00

39 lines
508 B
Bash

#!/bin/sh
# Start/stop/restart zramen (manages zram swap space)
# Source options
if [ -r /etc/default/zramen ]; then
. /etc/default/zramen
fi
zramen_start() {
if [ -x /usr/bin/zramen ]; then
/usr/bin/zramen make
fi
}
zramen_stop() {
if [ -x /usr/bin/zramen ]; then
/usr/bin/zramen toss
fi
}
zramen_restart() {
zramen_stop
sleep 1
zramen_start
}
case "$1" in
'start')
zramen_start
;;
'stop')
zramen_stop
;;
'restart')
zramen_restart
;;
*)
echo "usage $0 start|stop|restart"
esac