I want to toggle the states of wifi and Bluetooth. so i prepared script
wlan="$(grep -l "phy" /sys/class/rfkill/rfkill*/name)"
if [[ -f "$wlan" ]]; then
wlan_state="$(echo "$wlan" | sed 's/name$/state/')"
bt="$(grep -l "hci" /sys/class/rfkill/rfkill*/name)"
if [[ -f "$bt" ]]; then
bt_state="$(echo "$bt" | sed 's/name$/state/')"
if [ "$rfkill_curr_state" == "1" ]; then
echo $rfkill_new_state > $wlan_state
echo $rfkill_curr_state > $bt_state
Now i wanted to run this as a script or command/daemon which should continuously monitor the states of wlan and BT.
my question is how to write a snapcraft.yaml for it.
i went through snapcraft.io documentation and read all the info but im very much confused what to mention in apps and parts section since i'm very new to this.
kindly help me on this