Skip to content

Commit d5e9341

Browse files
roy9495GiteaBotsilverwind
authored
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>
1 parent 30c1cd9 commit d5e9341

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

contrib/upgrade.sh

+9
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
# upgrade.sh 1.15.10
1111
# giteahome=/opt/gitea giteaconf=$giteahome/app.ini upgrade.sh
1212

13+
# Check if gitea service is running
14+
if ! pidof gitea &> /dev/null; then
15+
echo "Error: gitea is not running."
16+
exit 1
17+
fi
18+
19+
# Continue with rest of the script if gitea is running
20+
echo "Gitea is running. Continuing with rest of script..."
21+
1322
# apply variables from environment
1423
: "${giteabin:="/usr/local/bin/gitea"}"
1524
: "${giteahome:="/var/lib/gitea"}"

0 commit comments

Comments
 (0)