wifi settings added and hostapd service

This commit is contained in:
wt committed 2024-07-09 12:12:44 +07:00
1 parent d5cbaa8d38
commit 9990e60387
26 files changed
+337 -60

No files matched your search

-3
View File
@@ -1,7 +1,4 @@
#!/bin/sh
Green='\033[0;32m'
Color_off='\033[0m'
Red='\033[0;31m'
. /etc/init.d/init-functions
+1 -4
View File
@@ -1,7 +1,4 @@
#!/bin/sh
Green='\033[0;32m'
Color_off='\033[0m'
Red='\033[0;31m'
. /etc/init.d/init-functions
@@ -20,7 +17,7 @@ case "$1" in
check $?
rm /var/run/dnsmasq &> /dev/null
else
notify "[$Red Dnsmasq is not running $Color_off]\n"
notify "[$Red Dnsmasq is not running $Color_Off]\n"
fi
;;
restart|reload)
-3
View File
@@ -1,7 +1,4 @@
#!/bin/sh
Green='\033[0;32m'
Color_Off='\033[0m'
Red='\033[0;31m'
. /etc/init.d/init-functions
+33
View File
@@ -0,0 +1,33 @@
#!/bin/sh
. /etc/init.d/init-functions
case "$1" in
start)
notify "Starting hostapd "
if [[ "$2" == "" ]]; then
/usr/bin/hostapd -P /var/run/hostapd.pid /etc/hostapd/hostapd
check $?
else
/usr/bin/hostapd -P /var/run/hostapd.pid $2
check $?
fi
;;
stop)
notify "Stopping hostapd "
if [ ! -f /var/run/hostapd.pid ]; then
notify "[$Red Dnsmasq is not running $Color_Off]\n"
exit 1
fi
kill $(cat /var/run/hostapd.pid)
check $?
;;
restart|reload)
"$0" stop
"$0" start
;;
*)
echo "hostapd init script usage: $0 {start|stop|restart}"
return 1
esac
return $?
-4
View File
@@ -1,9 +1,5 @@
#!/bin/sh
Green='\033[0;32m'
Color_Off='\033[0m'
Red='\033[0;31m'
. /etc/init.d/init-functions
case "$1" in
-3
View File
@@ -1,7 +1,4 @@
#!/bin/sh
Green='\033[0;32m'
Color_Off='\033[0m'
Red='\033[0;31m'
. /etc/init.d/init-functions
+1 -1
View File
@@ -68,7 +68,7 @@ check() {
if [[ "$1" == "0" ]];then
printf "[$Green OK $Color_Off]\n"
else
printf "[$Red ERR $Cpolor_Off]\n"
printf "[$Red ERR $Color_Off]\n"
fi
}
+1 -5
View File
@@ -1,9 +1,5 @@
#!/bin/sh
Green='\033[0;32m'
Color_off='\033[0m'
Red='\033[0;31m'
DAEMON="iptables"
IPTABLES_ARGS=""
@@ -37,7 +33,7 @@ save() {
iptables-save -f /etc/iptables.conf
status=$?
if [ "$status" -eq 0 ]; then
notify "[$Green OK $Color_off]\n"
notify "[$Green OK $Color_Off]\n"
else
echo "SKIP (read-only file system detected)"
fi
+1 -4
View File
@@ -1,7 +1,4 @@
#!/bin/sh
Green='\033[0;32m'
Color_off='\033[0m'
Red='\033[0;31m'
. /etc/init.d/init-functions
@@ -18,7 +15,7 @@ case "$1" in
check $?
rm /var/run/klogd.pid &> /dev/null
else
notify "[$Red Klogd is not running $Color_off]\n"
notify "[$Red Klogd is not running $Color_Off]\n"
fi
;;
restart|reload)
-3
View File
@@ -1,7 +1,4 @@
#!/bin/sh
Green='\033[0;32m'
Color_Off='\033[0m'
Red='\033[0;31m'
. /etc/init.d/init-functions
-3
View File
@@ -1,7 +1,4 @@
#!/bin/sh
Green='\033[0;32m'
Color_off='\033[0m'
Red='\033[0;31m'
. /etc/init.d/init-functions
-3
View File
@@ -1,7 +1,4 @@
#!/bin/sh
Green='\033[0;32m'
Color_Off='\033[0m'
Red='\033[0;31m'
. /etc/init.d/init-functions
-3
View File
@@ -1,7 +1,4 @@
#!/bin/sh
Green='\033[0;32m'
Color_off='\033[0m'
Red='\033[0;31m'
. /etc/init.d/init-functions
-3
View File
@@ -1,7 +1,4 @@
#!/bin/sh
Green='\033[0;32m'
Color_off='\033[0m'
Red='\033[0;31m'
. /etc/init.d/init-functions
-4
View File
@@ -1,9 +1,5 @@
#!/bin/sh
Green='\033[0;32m'
Color_Off='\033[0m'
Red='\033[0;31m'
. /etc/init.d/init-functions
case "$1" in
+1 -4
View File
@@ -1,7 +1,4 @@
#!/bin/sh
Green='\033[0;32m'
Color_off='\033[0m'
Red='\033[0;31m'
. /etc/init.d/init-functions
@@ -18,7 +15,7 @@ case "$1" in
check $?
rm /var/run/syslogd.pid &> /dev/null
else
notify "[$Red Syslogd is not running $Color_off]\n"
notify "[$Red Syslogd is not running $Color_Off]\n"
fi
;;
restart|reload)
-3
View File
@@ -1,7 +1,4 @@
#!/bin/sh
Green='\033[0;32m'
Color_off='\033[0m'
Red='\033[0;31m'
. /etc/init.d/init-functions
+1
View File
@@ -11,4 +11,5 @@
80iptables
85openrouterinit
90ftp
92hostapd
95nginx