[packages/gitlab-ce] gitlab-ctl: add restart task

glen glen at pld-linux.org
Tue Nov 1 22:07:45 CET 2016


commit 8e509dbbb360a9fe9eae316739dc8d41b63e6f30
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Nov 1 23:07:30 2016 +0200

    gitlab-ctl: add restart task

 gitlab-ctl.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/gitlab-ctl.sh b/gitlab-ctl.sh
index 42b5c59..9721758 100755
--- a/gitlab-ctl.sh
+++ b/gitlab-ctl.sh
@@ -66,6 +66,14 @@ posttrans() {
 	EOF
 }
 
+restart() {
+	local service services="gitlab-sidekiq gitlab-unicorn gitlab-workhorse"
+
+	for service in $services; do
+		service $service try-restart
+	done
+}
+
 usage() {
 	cat <<-EOF
 Usage: $0: command (subcommand)
@@ -77,6 +85,9 @@ backup
   Create a backup of the GitLab system
   http://docs.gitlab.com/ce/raketasks/backup_restore.html
 
+restart
+  Stop the services if they are running, then start them again.
+
 	EOF
 }
 
@@ -101,4 +112,7 @@ backup)
 upgrade)
 	upgrade "$@"
 	;;
+restart)
+	restart "$@"
+	;;
 esac
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gitlab-ce.git/commitdiff/8e509dbbb360a9fe9eae316739dc8d41b63e6f30



More information about the pld-cvs-commit mailing list