Files
initscripts/usr/lib/init/services/swap.service
T
2025-07-25 16:37:35 +07:00

34 lines
525 B
Desktop File

#!/bin/sh
#--- import colors and init-funcs ---
. /usr/lib/init/colors.sh
. /usr/lib/init/init-funcs.sh
#------------------------------------
SWAPON_OPTS="-a"
SWAPOFF_OPTS="-a"
start() {
notify "Starting swap"
/usr/bin/swapon $SWAPON_OPTS
check $? "start swap"
return $?
}
stop() {
notify "Stopping swap"
/usr/bin/swapoff $SWAPOFF_OPTS
check $? "stop swap"
return $?
}
case "$1" in
start|stop|restart|reload|help)
"$1"
;;
*)
help
return 1
esac
return $?