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 03syslogd
04swap 04swap
05networking 05networking
06sysctl 06netplugd
07crond 07sysctl
08dnsmasq 08crond
09dnsd 09dnsmasq
10telnetd 10dnsd
11sshd 11telnetd
12iptables 12sshd
13ftpd 13iptables
14hostapd 14ftpd
15httpd 15hostapd
16nginx 16httpd
17openrouterinit 17nginx
18dropbear 18openrouterinit
19gitea 19dropbear
20gitea