rc script, pm - package manger and update init scripts

This commit is contained in:
wt committed 2024-07-08 18:40:50 +07:00
1 parent 7c88b136ef
commit 31717c44b6
40 files changed
+569 -231

No files matched your search

+6 -12
View File
@@ -3,27 +3,21 @@ Green='\033[0;32m'
Color_Off='\033[0m'
Red='\033[0;31m'
. /etc/init.d/init-functions
case "$1" in
start)
printf "Starting fptd "
notify "Starting fptd "
tcpsvd -vE 0.0.0.0 21 ftpd -w -S -A $(cat /etc/openrouter/ftppath) &>/dev/null &
echo $! > /var/run/ftpd.pid
if [[ "$?" == "0" ]]; then
printf "[$Green OK $Color_Off]\n"
else
printf "[$Red ERR $Cpolor_Off]\n"
fi
check $?
;;
stop)
printf "Stopping ftpd "
notify "Stopping ftpd "
kill $(cat /var/run/ftpd.pid)
killall ftpd
rm /var/run/ftpd.pid
if [[ "$?" == "0" ]]; then
printf "[$Green OK $Color_Off]\n"
else
printf "[$Red ERR $Color_Off]\n"
fi
check $?
;;
restart|reload)
"$0" stop