From 1f9939b8cc582d061125b1fcb938d215e5a88eaf Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Tue, 14 Sep 2021 00:24:27 -0500 Subject: [PATCH] Update IKEv2 script - Install uuidgen on Alpine Linux --- extras/ikev2setup.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/extras/ikev2setup.sh b/extras/ikev2setup.sh index 21df54e..9925c6e 100755 --- a/extras/ikev2setup.sh +++ b/extras/ikev2setup.sh @@ -718,6 +718,13 @@ install_base64_uuidgen() { fi } +install_uuidgen() { + if ! command -v uuidgen >/dev/null 2>&1; then + bigecho2 "Installing required packages..." + apk add -U -q uuidgen || exiterr "'apk add' failed." + fi +} + create_mobileconfig() { [ -z "$server_addr" ] && get_server_address p12_base64=$(base64 -w 52 "$export_dir$client_name.p12") @@ -912,6 +919,8 @@ EOF export_client_config() { if [ "$os_type" != "alpine" ]; then install_base64_uuidgen + else + install_uuidgen fi export_p12_file create_mobileconfig