From 4bb2db13b8df500e19742d9482bf126ba35863c5 Mon Sep 17 00:00:00 2001 From: RecursiveProgrammer Date: Mon, 8 Mar 2021 13:34:23 -0600 Subject: [PATCH] Upgrade script errors, file had special characters, Parsing was not producing expected results, spawned by: https://github.com/RecursiveProgrammer/Remotely/issues/2 --- Server/wwwroot/Downloads/Ubuntu-Upgrade.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Server/wwwroot/Downloads/Ubuntu-Upgrade.sh b/Server/wwwroot/Downloads/Ubuntu-Upgrade.sh index 7eca9c9b..d7139676 100644 --- a/Server/wwwroot/Downloads/Ubuntu-Upgrade.sh +++ b/Server/wwwroot/Downloads/Ubuntu-Upgrade.sh @@ -1,6 +1,6 @@ #!/bin/bash -AppRoot=$(cat /etc/systemd/system/remotely.service | grep -i "execstart" | cut -d' ' -f 2) +AppRoot=$(cat /etc/systemd/system/remotely.service | grep -i "execstart" | cut -d' ' -f 2 | sed -e 's/\/[^\/]*$/\//') echo "Remotely server upgrade started." @@ -8,7 +8,6 @@ echo "Target path: $AppRoot" read -p "If this is not correct, press Ctrl + C now to abort!" - echo "Ensuring dependencies are installed." # Install other prerequisites. @@ -28,4 +27,4 @@ chown -R "$USER":www-data $AppRoot # Restart service. systemctl restart remotely.service -echo "Update complete." \ No newline at end of file +echo "Update complete."