mirror of https://github.com/OpenIPC/firmware.git
[no ci] Package: add wifibroadcast-ng cli shortcut (#1794)
parent
d68e6e2481
commit
7b8817526e
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
wfb_key=/etc/drone.key
|
wfb_key=/etc/drone.key
|
||||||
|
wfb_cfg=/etc/wfb.yaml
|
||||||
wfb_dev=wlan0
|
wfb_dev=wlan0
|
||||||
|
|
||||||
echo_log() {
|
echo_log() {
|
||||||
|
@ -17,7 +18,7 @@ wfb_yaml() {
|
||||||
}
|
}
|
||||||
|
|
||||||
load_config() {
|
load_config() {
|
||||||
wfb_yaml /etc/wfb.yaml
|
wfb_yaml "$wfb_cfg"
|
||||||
[ ! -e "$wfb_key" ] && wfb_key=/rom/etc/drone.key
|
[ ! -e "$wfb_key" ] && wfb_key=/rom/etc/drone.key
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,13 +143,18 @@ case "$1" in
|
||||||
;;
|
;;
|
||||||
|
|
||||||
reset)
|
reset)
|
||||||
cp -f /rom/etc/wfb.yaml /etc/wfb.yaml
|
cp -f /rom/"$wfb_cfg" "$wfb_cfg"
|
||||||
cp -f /rom/etc/majestic.yaml /etc/majestic.yaml
|
cp -f /rom/etc/majestic.yaml /etc/majestic.yaml
|
||||||
video_settings
|
video_settings
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
cli)
|
||||||
|
shift
|
||||||
|
yaml-cli -i "$wfb_cfg" "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 {start|stop|reset}"
|
echo "Usage: $0 {start|stop|reset|cli}"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue