How do I call one of the apps in my snap in the configure script?
I need to (re)authorize to a Backblaze B2 bucket whenever the user changes their keys, the keys are stored via the
snap set/get system so it makes sense the configure script would take care of this.
# ---- 8< snip --- b2: command: usr/bin/python3 $SNAP/bin/b2 plugs: - network-bind # ---- 8< snip ---
In my executable
#!/bin/sh -e KEY="$(snapctl get key)" snap run "$SNAP_NAME".b2 authorize-account $KEY
But when installing the snap via
--dangerous I get
/snap/xxx/x1/meta/hooks/configure: /snap/xxx/x1/meta/hooks/configure: snap: Permission denied.
This command needs network access, does the
configure hook get network access?