From e8e3caf26939579bb793d71cbbe83315f645ec84 Mon Sep 17 00:00:00 2001 From: Yaara Date: Mon, 8 Jan 2024 17:36:45 +0000 Subject: [PATCH 1/3] update license script --- scripts/update-licence.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 scripts/update-licence.sh diff --git a/scripts/update-licence.sh b/scripts/update-licence.sh new file mode 100755 index 00000000..3849d3b3 --- /dev/null +++ b/scripts/update-licence.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# +# +# Prompt user for the new license key +# +if [ -z "$1" ]; then + echo "Please provide the new license key as an argument." + exit 1 +fi + +new_license_key="$1" + +# Save copy before the update +cp .env .env.bak + +# Update the DASHBOARD_LICENCE in .env with the new license key +sed -e "s/^DASHBOARD_LICENCE=.*$/DASHBOARD_LICENCE=${new_license_key}/" .env > .env.output && mv .env.output .env + +# Check if sed command succeeded +if [ $? -eq 0 ]; then + echo "License key updated successfully" +else + echo "Failed to update the license key" +fi From 9f7bcb76fa839de094d932bdfd35b366a4e066e3 Mon Sep 17 00:00:00 2001 From: Yaara Date: Mon, 8 Jan 2024 17:38:31 +0000 Subject: [PATCH 2/3] Add instructions --- scripts/update-licence.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/update-licence.sh b/scripts/update-licence.sh index 3849d3b3..126f6c1a 100755 --- a/scripts/update-licence.sh +++ b/scripts/update-licence.sh @@ -1,5 +1,7 @@ #!/bin/bash # +# Use to update your licence key, instead of editing the file directly +# Usage: run it with the license key as an input # # Prompt user for the new license key # From 7e150d59b2d5aa6e15fcf75cd94453c1287d7957 Mon Sep 17 00:00:00 2001 From: David Garvey Date: Mon, 15 Jan 2024 14:15:16 +0100 Subject: [PATCH 3/3] ignore env backup --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 551c9669..9e279935 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .env +.env.bak .DS_store .context-data .bootstrap