added swap

This commit is contained in:
wt
2025-07-25 16:37:35 +07:00
parent 7e995fc336
commit 64a663b672
3 changed files with 49 additions and 14 deletions
+1
View File
@@ -0,0 +1 @@
../../usr/lib/init/services/swap.service
+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 $?
+15 -14
View File
@@ -3,17 +3,18 @@
03syslogd
04swap
05networking
06sysctl
07crond
08dnsmasq
09dnsd
10telnetd
11sshd
12iptables
13ftpd
14hostapd
15httpd
16nginx
17openrouterinit
18dropbear
19gitea
06netplugd
07sysctl
08crond
09dnsmasq
10dnsd
11telnetd
12sshd
13iptables
14ftpd
15hostapd
16httpd
17nginx
18openrouterinit
19dropbear
20gitea