kopia lustrzana https://github.com/Links2004/x6100-armbian
rodzic
a053245356
commit
3d98272300
|
@ -2,6 +2,7 @@
|
|||
Description=USB-C Port RAW CAT control
|
||||
Requires=x6100_socat_cat.service
|
||||
Requires=x6100_cat_mux.service
|
||||
Requires=x6100_app.service
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
|
|
|
@ -4,6 +4,7 @@ Requires=x6100_chroot.service
|
|||
|
||||
[Service]
|
||||
User=root
|
||||
Type=notify
|
||||
ExecStart=/root/run_x6100_socat_app.sh start
|
||||
ExecStop=/root/run_x6100_socat_app.sh stop
|
||||
Restart=on-failure
|
||||
|
|
|
@ -18,6 +18,9 @@ if [ "$ACTION" == "start" ] ; then
|
|||
if [ -e "${CAT_DEV_NEW}" ] ; then
|
||||
rm ${CAT_DEV_NEW}
|
||||
fi
|
||||
if [ -e "${CAT_DEV_ORG}" ] ; then
|
||||
rm ${CAT_DEV_ORG}
|
||||
fi
|
||||
|
||||
if [ ! -e "${CAT_DEV_ORG}" ] ; then
|
||||
# create orginal
|
||||
|
@ -25,6 +28,7 @@ if [ "$ACTION" == "start" ] ; then
|
|||
chown root:dialout ${CAT_DEV_ORG}
|
||||
fi
|
||||
|
||||
systemd-notify --ready --status="starting socat"
|
||||
exec socat pty,link=${CAT_DEV_NEW},raw,user=root,group=dialout,echo=0 tcp-listen:9990,bind=127.0.0.1,fork
|
||||
else
|
||||
if [ -e "${CAT_DEV_ORG}" ] ; then
|
||||
|
@ -43,5 +47,4 @@ else
|
|||
# restore orginal
|
||||
mknod -m 660 ${CAT_DEV} c 4 66
|
||||
chown root:dialout ${CAT_DEV}
|
||||
|
||||
fi
|
||||
|
|
Ładowanie…
Reference in New Issue