add-rc.d rm-rc.d scripts

This commit is contained in:
wt committed 2024-07-05 18:49:23 +07:00
1 parent 916cfecee7
commit 7c88b136ef
6 files changed
+39 -8

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
#!/bin/sh
if [ -f /etc/init.d/$1 ] && [ "$2" -gt 0 ]; then
cd /etc/rc.d
ln -sv ../init.d/$1 "$2$1"
echo "added $1 to init."
else
echo "
** add-rc.d usage:
add-rc.d [init.d script name] [order number]
examples:
add-rc.d httpd 40
add-rc.d ftpd 40
add-rc.d telnetd 50
"
fi
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
if [ -f /etc/rc.d/$1 ]; then
rm -v /etc/rc.d/$1
echo "removed $1 from init."
else
echo "
** rm-rc.d usage:
rm-rc.d [rc.d link name]
examples:
rm-rc.d 40httpd
rm-rc.d 40ftpd
rm-rc.d 50telnetd
"
fi