#!/bin/sh secret=$(uci get gluon_mesh_vpn_wireguard.mesh_vpn.secret) if [[ "$secret" = "generate" ]]; then secret="$(wg genkey)" uci set gluon_mesh_vpn_wireguard.mesh_vpn.secret="$secret" uci commit gluon_mesh_vpn_wireguard fi echo "$secret"