added configs and services and dropbear

This commit is contained in:
wt
2024-11-02 11:06:54 +07:00
parent 0fddbb33f2
commit 0ba5024474
27 changed files with 149 additions and 12 deletions
+3
View File
@@ -0,0 +1,3 @@
DROPBEAR_PORT=22
DROPBEAR_EXTRA_ARGS="-E -R -B -m"
ENABLE_ROOT_LOGIN="yes"
+6
View File
@@ -0,0 +1,6 @@
interface=eth1
dhcp-range=interface:eth1,192.168.200.2,192.168.200.100,12h
dhcp-range=interface:wlan0,192.168.201.2,192.168.201.100,12h
resolv-file=/etc/dnsmasq.conf.d/resolv.conf
addn-hosts=/etc/dnsmasq.conf.d/hosts
cache-size=10000
+1
View File
@@ -0,0 +1 @@
192.168.200.1 router.local.com
+1
View File
@@ -0,0 +1 @@
nameserver 8.8.8.8
+4
View File
@@ -0,0 +1,4 @@
root:x:0:root
dnsmasq:x:963:dnsmasq
sshd:x:33:sshd
nobody:x:65534:
+2
View File
@@ -0,0 +1,2 @@
127.0.0.1 localhost
::1 localhost
+11
View File
@@ -0,0 +1,11 @@
::sysinit:/etc/init.d/rcS
::ctrlaltdel:/sbin/reboot
::shutdown:/etc/init.d/rcK
tty1::respawn:/usr/bin/getty 38400 tty1
tty2::respawn:/usr/bin/getty 38400 tty2
tty3::respawn:/usr/bin/getty 38400 tty3
tty4::respawn:/usr/bin/getty 38400 tty4
ttyS0::respawn:/usr/bin/getty 115200 ttyS0
+11
View File
@@ -0,0 +1,11 @@
\h \r (\l)
########## ## #### #### ########## ## ##########
########## ## #### #### ########## ## ##########
## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ##
########## ## ## ## ## ########## ## ##########
########## ## ## ## ## ########## ## ##########
## ## ## ## ## ## ##
## ## ## ## ## ## ##
########## ## ## ## ## ########## ##########
########## ## ## ## ## ########## ##########
+16
View File
@@ -0,0 +1,16 @@
#--- Loopback interface ---
auto lo
iface lo inet loopback
#--------------------------
#--- eth0 connected to the internet dhcp ---
# auto eth0
# iface eth0 inet dhcp
#-------------------------------------------
#--- eth0 connected to the internet static ---
# auto eth0
# iface eth0 inet static
# address 192.168.200.1
# netmask 255.255.255.0
#---------------------------------------------
+1
View File
@@ -0,0 +1 @@
0
+1
View File
@@ -0,0 +1 @@
/
+1
View File
@@ -0,0 +1 @@
0
+1
View File
@@ -0,0 +1 @@
22
+1
View File
@@ -0,0 +1 @@
0
+1
View File
@@ -0,0 +1 @@
23
+1
View File
@@ -0,0 +1 @@
0
+1
View File
@@ -0,0 +1 @@
0
+4
View File
@@ -0,0 +1,4 @@
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
nobody:x:65534:65534:Kernel Oerflow User:/:/usr/bin/nologin
+25
View File
@@ -0,0 +1,25 @@
#!/bin/sh
#--- import colors ---
. /usr/lib/init/colors.sh
#---------------------
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/.local/bin
export PS1="$BGREEN** \u@\h: \$(date +%d.%m.%Y) \t\n\w \\\$ $RESET"
[ $(id -u) -eq 0 ] && export PS1="$BRED** \u@\h: \$(date +%d.%m.%Y) \t\n\w \\\$ $RESET"
#--- sys ---
alias psa='busybox ps' # show all processes
alias c='clear' # clear terminal screen
alias e='echo' # print in terminal
alias s='source' # source
alias una='uname -a' # system name
alias ifcnf='ifconfig' # ifconfig
alias ipr='ip route' # show routes
alias ipa='ip addr' # show addresses
alias ipl='ip link' # show links
alias ll='ls -lh' # show list files with information
alias la='ls -a'
alias l='ls -alh'
#-----------
+4
View File
@@ -0,0 +1,4 @@
root:F.fHA5x2Q.xNY:19797::::::
dnsmasq:!*:19889::::::
sshd:!:19906:0:99999:7:::
nobody:!*:19889::::::
+2
View File
@@ -0,0 +1,2 @@
/usr/bin/sh
/usr/bin/ash
+7 -7
View File
@@ -12,7 +12,7 @@
## ## ##
#---------------- variables --------------------------
rootdir=$(pwd)
rootdir=/
repofile=$rootdir/etc/pm/repo
packagesqueryfile=$rootdir/usr/share/pm/query
reposquerydir=$rootdir/usr/share/pm/repos
@@ -245,22 +245,22 @@ clear() {
#------------------------------------------------------------------------
case "$1" in
add)
add|a|-a)
add $*
;;
down)
down|download)
down $2
;;
unpack)
unpack|u|-u)
unpack $2
;;
del)
del|d|-d)
del $*
;;
list)
list|l|-l)
list $2
;;
query)
query|q|-q)
query
;;
help)
+1 -1
View File
@@ -11,7 +11,7 @@
## ##########
## ##########
rootdir=$(pwd)
rootdir=/
#----- colors -------
. $rootdir/usr/lib/init/colors.sh
+3 -3
View File
@@ -54,15 +54,15 @@ help() {
#------------ check status function ------------
check() {
if [ $1 -ne 0 ]; then
printf "$BBLUE**$BRED ERROR: $2\n$RESET"
printf "$BBLUE**$BWHITE $2 [$BRED ERROR $RESET]\n$RESET"
return
fi
printf "$BBLUE**$BGREEN SUCCESS: $2\n$RESET"
printf "$BBLUE**$BWHITE $2 [$BGREEN SUCCESS $RESET]\n$RESET"
}
#-----------------------------------------------
#--- notify func ---
notify() {
printf "$BBLUE**$BGREEN $1\n$RESET"
printf "$BBLUE**$BWHITE $1\n$RESET"
}
#-------------------
+38
View File
@@ -0,0 +1,38 @@
#!/bin/sh
#--- import colors and init-funcs ---
. /usr/lib/init/colors.sh
. /usr/lib/init/init-funcs.sh
#------------------------------------
. /etc/default/dropbear
ENABLE_ROOT_LOGIN_ARGS=""
if [ "$ENABLE_ROOT_LOGIN" = "no" ]; then
ENABLE_ROOT_LOGIN_ARGS="-w -g"
fi
start() {
notify "Starting dropbear"
/usr/bin/dropbear -P /var/run/dropbear.pid $DROPBEAR_EXTRA_ARGS $ENABLE_ROOT_LOGIN_ARGS -p $DROPBEAR_PORT &> /var/log/dropbear.log
check $? "start dropbear"
return $?
}
stop() {
notify "Stopping dropbear"
kill $(cat /var/run/dropbear.pid)
check $? "stop dropbear"
return $?
}
case "$1" in
start|stop|restart|reload|help)
"$1"
;;
*)
help
;;
esac
return $?
View File
+2 -1
View File
@@ -13,4 +13,5 @@
13hostapd
14httpd
15nginx
16openrouterinit
16openrouterinit
17dropbear