10 lines
246 B
Bash
Executable File
10 lines
246 B
Bash
Executable File
#!/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"
|