rootfs added and auth service in
This commit is contained in:
1 parent
35bd73b894
commit
1bea37deb2
113 files changed
+1369
-24
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -46,24 +46,9 @@
|
||||
<label for="telnetportinput" class="forminputlabel">Port</label>
|
||||
<input type="text" id="telnetportinput" class="forminput">
|
||||
</div>
|
||||
<table class="telnetuserstable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>username</th>
|
||||
<th>password</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><th>No users</th></tr>
|
||||
<!-- <tr>
|
||||
<th>root</th>
|
||||
<th>2808</th>
|
||||
</tr> -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="settingrectfooter">
|
||||
<button class="settingrectfooterbutton hiddenbutton" id="add_telnet_user_button">Add telnet user</button>
|
||||
<!-- <button class="settingrectfooterbutton hiddenbutton" id="add_telnet_user_button">Add telnet user</button> -->
|
||||
<button class="settingrectfooterbutton" id="set_telnet_settings">Confirm</button>
|
||||
</div>
|
||||
</div>
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,7 +1,7 @@
|
||||
const telnetenabled = document.querySelector('#telnetenable')
|
||||
const telnetsettingbody = document.querySelector('.telnetsettingbody')
|
||||
const settelnetsettingsbutton = document.querySelector('#set_telnet_settings')
|
||||
const addtelnetuserbutton = document.querySelector('#add_telnet_user_button')
|
||||
// const addtelnetuserbutton = document.querySelector('#add_telnet_user_button')
|
||||
|
||||
const telnetportinput = document.querySelector('#telnetportinput')
|
||||
|
||||
@@ -12,12 +12,12 @@ const get_telnet_enabled_status = () => {
|
||||
}).then(res => res.json()).then(jsondata => {
|
||||
if (jsondata.enabled === '1') {
|
||||
telnetenabled.checked = true
|
||||
addtelnetuserbutton.classList.add('active')
|
||||
addtelnetuserbutton.parentElement.classList.remove('onebutton')
|
||||
// addtelnetuserbutton.classList.add('active')
|
||||
// addtelnetuserbutton.parentElement.classList.remove('onebutton')
|
||||
telnetsettingbody.classList.add('active')
|
||||
return;
|
||||
} else {
|
||||
addtelnetuserbutton.parentElement.classList.add('onebutton')
|
||||
// addtelnetuserbutton.parentElement.classList.add('onebutton')
|
||||
}
|
||||
}).catch((error) => {
|
||||
notification(`Ошибка на сервере: ${error}`, "error")
|
||||
@@ -41,13 +41,13 @@ const set_telnet_enabled_status = () => {
|
||||
|
||||
telnetenabled.addEventListener('click', () => {
|
||||
if (telnetenabled.checked) {
|
||||
addtelnetuserbutton.classList.add('active')
|
||||
addtelnetuserbutton.parentElement.classList.remove('onebutton')
|
||||
// addtelnetuserbutton.classList.add('active')
|
||||
// addtelnetuserbutton.parentElement.classList.remove('onebutton')
|
||||
telnetsettingbody.classList.add('active')
|
||||
} else {
|
||||
telnetsettingbody.classList.remove('active')
|
||||
addtelnetuserbutton.classList.remove('active')
|
||||
addtelnetuserbutton.parentElement.classList.add('onebutton')
|
||||
// addtelnetuserbutton.classList.remove('active')
|
||||
// addtelnetuserbutton.parentElement.classList.add('onebutton')
|
||||
}
|
||||
})
|
||||
|
||||
File renamed without changes.
@@ -0,0 +1,5 @@
|
||||
interface=eth1
|
||||
dhcp-range=192.168.100.2,192.168.100.100,12h
|
||||
resolv-file=/etc/dnsmasq.conf.d/resolv.conf
|
||||
addn-hosts=/etc/dnsmasq.conf.d/hosts
|
||||
cache-size=10000
|
||||
@@ -0,0 +1 @@
|
||||
192.168.100.1 router.local.com
|
||||
@@ -0,0 +1,2 @@
|
||||
nameserver 192.168.0.1
|
||||
nameserver 172.20.10.1
|
||||
@@ -0,0 +1,6 @@
|
||||
# Start /etc/fstab
|
||||
# disk mountpoint filesystem options 0 0/1
|
||||
UUID=b1e5ea4e-0be6-4601-827e-b08f78f61709 / ext4 rw,relatime 0 0
|
||||
UUID=70f09a2f-f164-4279-98a9-9106899ef98a none swap defaults 0 0
|
||||
UUID=AE72-FCB8 /boot/EFI vfat rw,relatime 0 0
|
||||
# End /etc/fstab
|
||||
@@ -0,0 +1,3 @@
|
||||
root:x:0:root
|
||||
dnsmasq:x:963:
|
||||
sshd:x:33:sshd
|
||||
@@ -0,0 +1,3 @@
|
||||
root:x:0:root
|
||||
dnsmasq:x:963:
|
||||
sshd:x:33:
|
||||
@@ -0,0 +1 @@
|
||||
Simple
|
||||
@@ -0,0 +1,3 @@
|
||||
127.0.0.1 localhost
|
||||
::1 localhost
|
||||
127.0.1.1 Simple.localdomain
|
||||
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
Green='\033[0;32m'
|
||||
Color_off='\033[0m'
|
||||
Red='\033[0;31m'
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting dnsd "
|
||||
# sleep 10
|
||||
/usr/bin/dnsd -d -c /etc/dnsd.conf
|
||||
echo "nameserver 0.0.0.0" > /etc/resolv.conf
|
||||
if [[ "$?" == "0" ]]; then
|
||||
echo "nameserver 0.0.0.0" > /etc/resolv.conf
|
||||
echo $(pgrep dnsd) > /var/run/dnsd.pid
|
||||
printf "[$Green OK $Color_off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_off]\n"
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping dnsd "
|
||||
kill $(cat /var/run/dnsd.pid) &> /dev/null
|
||||
rm /var/run/dnsd.pid
|
||||
if [[ "$?" == "0" ]]; then
|
||||
printf "[$Green OK $Color_off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_off]\n"
|
||||
fi
|
||||
;;
|
||||
restart|reload)
|
||||
"$0" stop
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
echo "dnsmasq init script usage: $0 {start|stop|restart}"
|
||||
return 1
|
||||
esac
|
||||
return $?
|
||||
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
Green='\033[0;32m'
|
||||
Color_off='\033[0m'
|
||||
Red='\033[0;31m'
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting dnsmasq "
|
||||
sleep 1
|
||||
/usr/bin/dnsmasq --user=dnsmasq --pid-file=/var/run/dnsmasq.pid
|
||||
if [[ "$?" == "0" ]]; then
|
||||
echo "nameserver 0.0.0.0" > /etc/resolv.conf
|
||||
printf "[$Green OK $Color_off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_off]\n"
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
printf "\nStopping dnsmasq "
|
||||
if [ -f /var/run/dnsmasq.pid ]; then
|
||||
kill $(cat /var/run/dnsmasq.pid) &> /dev/null
|
||||
if [[ "$?" == "0" ]]; then
|
||||
printf "[$Green OK $Color_off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_off]\n"
|
||||
fi
|
||||
rm /var/run/dnsmasq &> /dev/null
|
||||
else
|
||||
printf "[$Red Dnsmasq is not running $Color_off]\n"
|
||||
fi
|
||||
;;
|
||||
restart|reload)
|
||||
"$0" stop
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
echo "dnsmasq init script usage: $0 {start|stop|restart}"
|
||||
return 1
|
||||
esac
|
||||
return $?
|
||||
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
Green='\033[0;32m'
|
||||
Color_Off='\033[0m'
|
||||
Red='\033[0;31m'
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "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
|
||||
;;
|
||||
stop)
|
||||
printf "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
|
||||
;;
|
||||
restart|reload)
|
||||
"$0" stop
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
echo "ftpd init script usage: $0 {start|stop|restart}"
|
||||
return 1
|
||||
esac
|
||||
return $?
|
||||
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
Green='\033[0;32m'
|
||||
Color_Off='\033[0m'
|
||||
Red='\033[0;31m'
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Setting up hostname "
|
||||
/bin/hostname -F /etc/hostname
|
||||
if [[ "$?" == "0" ]]; then
|
||||
printf "[$Green OK $Color_Off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_Off]\n"
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
;;
|
||||
*)
|
||||
echo "Hostname init script usage: $0 {start}"
|
||||
return 1
|
||||
esac
|
||||
return $?
|
||||
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
Green='\033[0;32m'
|
||||
Color_Off='\033[0m'
|
||||
Red='\033[0;31m'
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting httpd "
|
||||
httpd -h /srv/www &> /dev/null
|
||||
if [[ "$?" == "0" ]]; then
|
||||
printf "[$Green OK $Color_Off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Cpolor_Off]\n"
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping httpd "
|
||||
killall httpd
|
||||
#kill $(cat /var/run/httpd.pid)
|
||||
#rm /var/run/httpd.pid
|
||||
if [[ "$?" == "0" ]]; then
|
||||
printf "[$Green OK $Color_Off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_Off]\n"
|
||||
fi
|
||||
;;
|
||||
restart|reload)
|
||||
"$0" stop
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
echo "httpd init script usage: $0 {start|stop|restart}"
|
||||
return 1
|
||||
esac
|
||||
return $?
|
||||
@@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
|
||||
init () {
|
||||
test -f $DAEMON || exit 0
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting $DESC..."
|
||||
if [ $LOG ] ; then
|
||||
$DAEMON $PARAMS 2>>/var/log/$LOG &
|
||||
else
|
||||
$DAEMON $PARAMS &>/dev/null &
|
||||
fi
|
||||
echo $! > $PIDFILE
|
||||
;;
|
||||
stop)
|
||||
printf "\nStopping $DESC..."
|
||||
if [ $STOP ] ; then
|
||||
$STOP $PARAMS
|
||||
else
|
||||
[ -f $PIDFILE ] && kill $(cat $PIDFILE) &>/dev/null
|
||||
fi
|
||||
;;
|
||||
restart|reload)
|
||||
"$0" stop
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
echo "$NAME init script usage: $0 {start|stop|restart}"
|
||||
return 1
|
||||
esac
|
||||
return $?
|
||||
}
|
||||
|
||||
rc () {
|
||||
if [ -d /etc/rc.d ] && [ $0 == "/etc/init.d/rcK" ]; then
|
||||
for x in $(ls -r /etc/rc.d/) ; do
|
||||
/etc/rc.d/$x stop
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
for i in /etc/rc.d/??* ; do
|
||||
[ ! -f "$i" ] && continue
|
||||
case "$i" in
|
||||
*.sh)
|
||||
(
|
||||
trap - INT QUIT TSTP
|
||||
set start
|
||||
. $i
|
||||
)
|
||||
;;
|
||||
*)
|
||||
$i start
|
||||
;;
|
||||
esac
|
||||
done
|
||||
sleep 1
|
||||
#clear
|
||||
return 1
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
#!/bin/sh
|
||||
|
||||
Green='\033[0;32m'
|
||||
Color_off='\033[0m'
|
||||
Red='\033[0;31m'
|
||||
|
||||
DAEMON="iptables"
|
||||
|
||||
IPTABLES_ARGS=""
|
||||
|
||||
start() {
|
||||
printf 'Starting %s: ' "$DAEMON"
|
||||
iptables-restore /etc/iptables.conf
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
printf "[$Green OK $Color_off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_off]\n"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf 'Stopping %s: ' "$DAEMON"
|
||||
iptables -F
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
printf "[$Green OK $Color_off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_off]\n"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
save() {
|
||||
printf 'Saving %s: ' "$DAEMON"
|
||||
iptables-save -f /etc/iptables.conf
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
printf "[$Green OK $Color_off]\n"
|
||||
else
|
||||
echo "SKIP (read-only file system detected)"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart|save)
|
||||
"$1";;
|
||||
reload)
|
||||
# Restart, since there is no true "reload" feature.
|
||||
restart;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|save|reload}"
|
||||
exit 1
|
||||
esac
|
||||
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
Green='\033[0;32m'
|
||||
Color_off='\033[0m'
|
||||
Red='\033[0;31m'
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting klogd "
|
||||
klogd
|
||||
if [[ "$?" == "0" ]]; then
|
||||
printf "[$Green OK $Color_off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_off]\n"
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping klogd "
|
||||
if [ -f /var/run/klogd.pid ]; then
|
||||
kill $(cat /var/run/klogd.pid)
|
||||
if [[ "$?" == "0" ]]; then
|
||||
printf "[$Green OK $Color_off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_off]\n"
|
||||
fi
|
||||
rm /var/run/klogd.pid &> /dev/null
|
||||
else
|
||||
printf "[$Red Klogd is not running $Color_off]\n"
|
||||
fi
|
||||
;;
|
||||
restart|reload)
|
||||
"$0" stop
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
echo "klogd init script usage: $0 {start|stop|restart}"
|
||||
return 1
|
||||
esac
|
||||
return $?
|
||||
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
Green='\033[0;32m'
|
||||
Color_Off='\033[0m'
|
||||
Red='\033[0;31m'
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting networking "
|
||||
/usr/bin/ifup -a &>/dev/null &
|
||||
echo $! > /var/run/networking.pid
|
||||
if [[ "$?" == "0" ]]; then
|
||||
printf "[$Green OK $Color_Off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Cpolor_Off]\n"
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping networking "
|
||||
/usr/bin/ifdown -a
|
||||
rm /var/run/networking.pid
|
||||
if [[ "$?" == "0" ]]; then
|
||||
printf "[$Green OK $Color_Off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_Off]\n"
|
||||
fi
|
||||
;;
|
||||
restart|reload)
|
||||
"$0" stop
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
echo "networking init script usage: $0 {start|stop|restart}"
|
||||
return 1
|
||||
esac
|
||||
return $?
|
||||
File renamed without changes.
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
. /etc/init.d/init-functions
|
||||
rc
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
. /etc/init.d/init-functions
|
||||
rc
|
||||
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
Green='\033[0;32m'
|
||||
Color_off='\033[0m'
|
||||
Red='\033[0;31m'
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting sshd "
|
||||
/usr/bin/sshd -D &
|
||||
if [[ "$?" == "0" ]]; then
|
||||
printf "[$Green OK $Color_off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_off]\n"
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping sshd "
|
||||
killall sshd
|
||||
if [[ "$?" == "0" ]]; then
|
||||
printf "[$Green OK $Color_off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_off]\n"
|
||||
fi
|
||||
;;
|
||||
restart|reload)
|
||||
"$0" stop
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
echo "sshd init script usage: $0 {start|stop|restart}"
|
||||
return 1
|
||||
esac
|
||||
return $?
|
||||
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
Green='\033[0;32m'
|
||||
Color_off='\033[0m'
|
||||
Red='\033[0;31m'
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Configuring swap "
|
||||
swapon -a
|
||||
if [[ "$?" == "0" ]]; then
|
||||
printf "[$Green OK $Color_off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_off]\n"
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping use swap "
|
||||
swapoff -a
|
||||
if [[ "$?" == "0" ]]; then
|
||||
printf "[$Green OK $Color_off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_off]\n"
|
||||
fi
|
||||
;;
|
||||
restart|reload)
|
||||
"$0" stop
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
echo "swap init script usage: $0 {start|stop|restart}"
|
||||
return 1
|
||||
esac
|
||||
return $?
|
||||
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
Green='\033[0;32m'
|
||||
Color_Off='\033[0m'
|
||||
Red='\033[0;31m'
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Setting up sysctl "
|
||||
sysctl -p &> /dev/null
|
||||
if [[ "$?" == "0" ]]; then
|
||||
printf "[$Green OK $Color_Off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_Off]\n"
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
;;
|
||||
*)
|
||||
echo "Sysctl init script usage: $0 {start}"
|
||||
return 1
|
||||
esac
|
||||
return $?
|
||||
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
Green='\033[0;32m'
|
||||
Color_off='\033[0m'
|
||||
Red='\033[0;31m'
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting syslogd "
|
||||
syslogd
|
||||
if [[ "$?" == "0" ]]; then
|
||||
printf "[$Green OK $Color_off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_off]\n"
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping syslogd "
|
||||
if [ -f /var/run/syslogd.pid ]; then
|
||||
kill $(cat /var/run/syslogd.pid)
|
||||
if [[ "$?" == "0" ]]; then
|
||||
printf "[$Green OK $Color_off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_off]\n"
|
||||
fi
|
||||
rm /var/run/syslogd.pid &> /dev/null
|
||||
else
|
||||
printf "[$Red Syslogd is not running $Color_off]\n"
|
||||
fi
|
||||
;;
|
||||
restart|reload)
|
||||
"$0" stop
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
echo "syslogd init script usage: $0 {start|stop|restart}"
|
||||
return 1
|
||||
esac
|
||||
return $?
|
||||
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
Green='\033[0;32m'
|
||||
Color_off='\033[0m'
|
||||
Red='\033[0;31m'
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting telnet "
|
||||
telnetd -p $(cat /etc/openrouter/telnet/port)
|
||||
if [[ "$?" == "0" ]]; then
|
||||
printf "[$Green OK $Color_off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_off]\n"
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping telnet "
|
||||
killall telnetd
|
||||
if [[ "$?" == "0" ]]; then
|
||||
printf "[$Green OK $Color_off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_off]\n"
|
||||
fi
|
||||
;;
|
||||
restart|reload)
|
||||
"$0" stop
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
echo "telnet init script usage: $0 {start|stop|restart}"
|
||||
return 1
|
||||
esac
|
||||
return $?
|
||||
@@ -0,0 +1,9 @@
|
||||
::sysinit:/etc/init.d/rcS
|
||||
|
||||
::ctrlaltdel:/sbin/reboot
|
||||
::shutdown:/etc/init.d/rcK
|
||||
|
||||
tty1::respawn:/usr/bin/getty 38400 tty1
|
||||
tty2::askfirst:/usr/bin/getty 38400 tty2
|
||||
tty3::askfirst:/usr/bin/getty 38400 tty3
|
||||
tty4::askfirst:/usr/bin/getty 38400 tty4
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated by iptables-save v1.8.10 on Tue Jun 25 06:14:51 2024
|
||||
*filter
|
||||
:INPUT ACCEPT [7:400]
|
||||
:FORWARD ACCEPT [0:0]
|
||||
:OUTPUT ACCEPT [13:850]
|
||||
-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||
-A FORWARD -i eth1 -o eth0 -j ACCEPT
|
||||
COMMIT
|
||||
# Completed on Tue Jun 25 06:14:51 2024
|
||||
# Generated by iptables-save v1.8.10 on Tue Jun 25 06:14:51 2024
|
||||
*nat
|
||||
:PREROUTING ACCEPT [0:0]
|
||||
:INPUT ACCEPT [0:0]
|
||||
:OUTPUT ACCEPT [4:292]
|
||||
:POSTROUTING ACCEPT [0:0]
|
||||
-A POSTROUTING -o eth0 -j MASQUERADE
|
||||
COMMIT
|
||||
# Completed on Tue Jun 25 06:14:51 2024
|
||||
@@ -0,0 +1 @@
|
||||
Simple \r (\l)
|
||||
@@ -0,0 +1,8 @@
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
auto eth0
|
||||
iface eth0 inet dhcp
|
||||
auto eth1
|
||||
iface eth1 inet static
|
||||
address 192.168.100.1
|
||||
netmask 255.255.255.0
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
/
|
||||
@@ -0,0 +1 @@
|
||||
22
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
10
|
||||
@@ -0,0 +1,3 @@
|
||||
root:x:0:0:root:/root:/bin/sh
|
||||
dnsmasq:x:963:963:dnsmasq daemon:/:/usr/bin/nologin
|
||||
sshd:x:33:33:SSH daemon:/var/lib/sshd:/bin/sh
|
||||
@@ -0,0 +1,2 @@
|
||||
root:x:0:0:root:/root:/bin/sh
|
||||
dnsmasq:x:963:963:dnsmasq daemon:/:/usr/bin/nologin
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../init.d/hostname
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../init.d/klogd
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../init.d/syslogd
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../init.d/swap
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../init.d/networking
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../init.d/sysctl
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../init.d/dnsmasq
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../init.d/ssh
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../init.d/iptables
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../init.d/ftp
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../init.d/openrouterinit
|
||||
@@ -0,0 +1 @@
|
||||
nameserver 172.20.10.1
|
||||
Loaded 100 of 113 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user