summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorTATHAGATA ROY <98920199+roy9495@users.noreply.github.com>2023-04-25 22:49:58 +0530
committerGitHub <noreply@github.com>2023-04-25 13:19:58 -0400
commitd5e93413bcd7d34af4371136bb6d97c7eb393123 (patch)
tree0c80c0794bcd08b6d7f0becbb1b243a0e8bc31d3 /contrib
parent30c1cd97758592e20b6ecb3462da0f0289622828 (diff)
downloadgitea-d5e93413bcd7d34af4371136bb6d97c7eb393123.tar.gz
gitea-d5e93413bcd7d34af4371136bb6d97c7eb393123.zip
Updated upgrade script that is informing user that Gitea service has to be running in order to upgrade it (#24260)
Hello sir, This pull request solves issue #23949 I have updated the upgrade script such that it will check if the Gitea service is running, if it's not running then it will exit the process and if it's running then the process will move further ahead. Thank You. --------- Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/upgrade.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/upgrade.sh b/contrib/upgrade.sh
index 2d15f17332..4b166a02a0 100755
--- a/contrib/upgrade.sh
+++ b/contrib/upgrade.sh
@@ -10,6 +10,15 @@
# upgrade.sh 1.15.10
# giteahome=/opt/gitea giteaconf=$giteahome/app.ini upgrade.sh
+# Check if gitea service is running
+if ! pidof gitea &> /dev/null; then
+ echo "Error: gitea is not running."
+ exit 1
+fi
+
+# Continue with rest of the script if gitea is running
+echo "Gitea is running. Continuing with rest of script..."
+
# apply variables from environment
: "${giteabin:="/usr/local/bin/gitea"}"
: "${giteahome:="/var/lib/gitea"}"