From 35a96b26445e4cf2b794f1d87bccb6b8d1ee96bf Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Fri, 26 Jan 2024 17:03:32 -0500 Subject: [PATCH] Set account to standalone if not set by the gadget and set computer-title to the output of hostname if not set by the gadget --- snap/hooks/default-configure | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/snap/hooks/default-configure b/snap/hooks/default-configure index 1892c6be2..3dab3133f 100644 --- a/snap/hooks/default-configure +++ b/snap/hooks/default-configure @@ -12,6 +12,14 @@ if [ -z "$_url" ]; then _url="https://landscape.canonical.com" fi +if [ -z "$_account" ]; then + _account="standalone" +fi + +if [ -z "$_title" ]; then + _title=$(hostname) +fi + cat > "$CLIENT_CONF" << EOF [client] account_name = $_account