added swap

This commit is contained in:
wt committed 2025-07-25 16:37:35 +07:00
1 parent 7e995fc336
commit 64a663b672
3 files changed
+49 -14

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
#!/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 $?