added swap
This commit is contained in:
Symlink
+1
@@ -0,0 +1 @@
|
|||||||
|
../../usr/lib/init/services/swap.service
|
||||||
@@ -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
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user