This commit is contained in:
Zach Brown
2024-04-09 19:18:06 +00:00
parent 223e704adc
commit 2024ec569c
6 changed files with 11 additions and 7 deletions

View File

@@ -329,8 +329,9 @@ install_lighttpd() {
mount -o remount,rw /
mkdir -p "$LIGHTTPD_DIR"
wget -O "$LIGHTTPD_DIR/lighttpd.conf" https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/lighttpd/lighttpd.conf
wget -O "$LIGHTTPD_DIR/lighttpd.service" https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/lighttpd/lighttpd.service
ln -sf "$LIGHTTPD_DIR/lighttpd.service" "/lib/systemd/system/lighttpd.service"
wget -O "/lib/systemd/system/lighttpd.service" https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/lighttpd/lighttpd.service
ln -sf "/lib/systemd/system/lighttpd.service" "/lib/systemd/system/multi-user.target.wants/"
openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 \
-subj "/C=US/ST=MI/L=Romulus/O=RMIITools/CN=localhost" \
-keyout $LIGHTTPD_DIR/server.key -out $LIGHTTPD_DIR/server.crt
@@ -1100,8 +1101,8 @@ echo " :+##+. "
remount_rw
mkdir /usrdata/sshd
wget -O /usrdata/sshd/sshd.service "https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/sshd/sshd.service"
ln -sf "/usrdata/sshd/sshd.service" "/lib/systemd/system/sshd.service"
wget -O /lib/systemd/system/sshd.service "https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/sshd/sshd.service"
ln -sf "/lib/systemd/system/sshd.service" "/lib/systemd/system/multi-user.target.wants/"
opkg install openssh-server-pam
/opt/bin/ssh-keygen -A

View File

@@ -99,6 +99,7 @@ WantedBy=basic.target local-fs.target
EOF
systemctl daemon-reload
ln -s /lib/systemd/system/opt.mount /lib/systemd/system/local-fs.target.wants/opt.mount
systemctl enable opt.mount
systemctl start opt.mount
}

View File

@@ -5,3 +5,5 @@ lighttpd-mod-cgi
lighttpd-mod-openssl
lighttpd-mod-proxy
printf "USER:$(openssl passwd -crypt PASSWORD)\n" >> .htpasswd

View File

@@ -7,7 +7,7 @@ server.modules = (
)
server.username = "nobody"
server.groupname = "nogroup"
server.groupname = "dialout"
server.port = 80
server.document-root = "/usrdata/simpleadmin/www"

View File

@@ -3,7 +3,7 @@ Description=Socat Serial Emulation for smd11
After=ql-netd.service
[Service]
ExecStart=/usrdata/socat-at-bridge/socat-armel-static -d -d pty,link=/dev/ttyIN,raw,echo=0 pty,link=/dev/ttyOUT,raw,echo=1
ExecStart=/usrdata/socat-at-bridge/socat-armel-static -d -d pty,link=/dev/ttyIN,raw,echo=0,group=20,perm=660 pty,link=/dev/ttyOUT,raw,echo=1,group=20,perm=660
# Add a delay to prevent the clients from starting too early
ExecStartPost=/bin/sleep 2s
Restart=always

View File

@@ -3,7 +3,7 @@ Description=Socat Serial Emulation for smd7
After=ql-netd.service
[Service]
ExecStart=/usrdata/socat-at-bridge/socat-armel-static -d -d pty,link=/dev/ttyIN2,raw,echo=0 pty,link=/dev/ttyOUT2,raw,echo=1
ExecStart=/usrdata/socat-at-bridge/socat-armel-static -d -d pty,link=/dev/ttyIN2,raw,echo=0,group=20,perm=660 pty,link=/dev/ttyOUT2,raw,echo=1,group=20,perm=660
# Add a delay to prevent the clients from starting too early
ExecStartPost=/bin/sleep 2s
Restart=always