From 7b8817526ea09c02b3834c00484d1ed5f70beb58 Mon Sep 17 00:00:00 2001 From: viktorxda <35473052+viktorxda@users.noreply.github.com> Date: Thu, 10 Apr 2025 17:44:22 +0200 Subject: [PATCH] [no ci] Package: add wifibroadcast-ng cli shortcut (#1794) --- general/package/wifibroadcast-ng/files/wifibroadcast | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/general/package/wifibroadcast-ng/files/wifibroadcast b/general/package/wifibroadcast-ng/files/wifibroadcast index 999cdad1..c072b1d5 100755 --- a/general/package/wifibroadcast-ng/files/wifibroadcast +++ b/general/package/wifibroadcast-ng/files/wifibroadcast @@ -1,5 +1,6 @@ #!/bin/sh wfb_key=/etc/drone.key +wfb_cfg=/etc/wfb.yaml wfb_dev=wlan0 echo_log() { @@ -17,7 +18,7 @@ wfb_yaml() { } load_config() { - wfb_yaml /etc/wfb.yaml + wfb_yaml "$wfb_cfg" [ ! -e "$wfb_key" ] && wfb_key=/rom/etc/drone.key } @@ -142,13 +143,18 @@ case "$1" in ;; 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 video_settings ;; + cli) + shift + yaml-cli -i "$wfb_cfg" "$@" + ;; + *) - echo "Usage: $0 {start|stop|reset}" + echo "Usage: $0 {start|stop|reset|cli}" exit 1 ;; esac