Skip to content

Commit

Permalink
Remove symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
RadxaYuntian committed Apr 25, 2023
1 parent 913eb29 commit 0cb4a12
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 64 deletions.
2 changes: 1 addition & 1 deletion debian/install
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
src/radxa-* /usr/sbin
src/radxa-otgutils /usr/sbin
man/*.8 /usr/share/man/man8
6 changes: 3 additions & 3 deletions debian/radxa-otgutils.radxa-adbd.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ After=network.target

[Service]
RemainAfterExit=yes
ExecStart=/usr/sbin/radxa-adbd start
ExecStop=/usr/sbin/radxa-adbd stop
ExecReload=/usr/sbin/radxa-adbd reload
ExecStart=/usr/sbin/radxa-otgutils adbd start
ExecStop=/usr/sbin/radxa-otgutils adbd stop
ExecReload=/usr/sbin/radxa-otgutils adbd reload

[Install]
WantedBy=multi-user.target
6 changes: 3 additions & 3 deletions debian/radxa-otgutils.radxa-usbnet.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ After=network.target

[Service]
RemainAfterExit=yes
ExecStart=/usr/sbin/radxa-usbnet start
ExecStop=/usr/sbin/radxa-usbnet stop
ExecReload=/usr/sbin/radxa-usbnet reload
ExecStart=/usr/sbin/radxa-otgutils usbnet start
ExecStop=/usr/sbin/radxa-otgutils usbnet stop
ExecReload=/usr/sbin/radxa-otgutils usbnet reload

[Install]
WantedBy=multi-user.target
13 changes: 0 additions & 13 deletions man/radxa-adbd.8.md

This file was deleted.

14 changes: 0 additions & 14 deletions man/radxa-usbnet.8.md

This file was deleted.

1 change: 0 additions & 1 deletion src/radxa-adbd

This file was deleted.

44 changes: 16 additions & 28 deletions src/radxa-otgutils
Original file line number Diff line number Diff line change
Expand Up @@ -114,41 +114,29 @@ stop()
}

MODE=
case "$(basename "$0")" in
radxa-adbd)
if ! command -v adbd
then
echo "Did not find adbd. Please check if related packages are installed."
exit 1
fi
MODE=adbd
;;
radxa-usbnet)
MODE=usbnet
;;
radxa-otgutils)
echo Please run this script from symbolic links.
exit 1
case "$1" in
adbd|usbnet)
MODE="$1"
;;
*)
echo Unknown script name.
echo "Unknown mode. Valid values are adbd or usbnet."
exit 1
;;
esac

case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
case "$2" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
echo "Usage: $0 <adbd|usbnet> <start|stop|restart>"
exit 1
esac

Expand Down
1 change: 0 additions & 1 deletion src/radxa-usbnet

This file was deleted.

0 comments on commit 0cb4a12

Please sign in to comment.