[packages/gitlab-ce] gitlab-ctl: add tail command
glen
glen at pld-linux.org
Sat Dec 24 13:55:26 CET 2016
commit d4c913ff111d2f367dbf9e58a9f9125546b665b9
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sat Dec 24 14:54:06 2016 +0200
gitlab-ctl: add tail command
gitlab-ctl.sh | 13 +++++++++++++
1 file changed, 13 insertions(+)
---
diff --git a/gitlab-ctl.sh b/gitlab-ctl.sh
index 9721758..6ade6a6 100755
--- a/gitlab-ctl.sh
+++ b/gitlab-ctl.sh
@@ -74,6 +74,13 @@ restart() {
done
}
+# run tail on the logs
+# https://github.com/chef/omnibus-ctl/blob/v0.3.6/lib/omnibus-ctl.rb#L427-L436
+logtail() {
+ # find /var/log -type f -not -path '*/sasl/*' | grep -E -v '(lock|@|tgz|gzip)' | xargs tail --follow=name --retry
+ tail -F /var/log/gitlab/*.log
+}
+
usage() {
cat <<-EOF
Usage: $0: command (subcommand)
@@ -85,6 +92,9 @@ backup
Create a backup of the GitLab system
http://docs.gitlab.com/ce/raketasks/backup_restore.html
+tail
+ Watch the service logs of all enabled services.
+
restart
Stop the services if they are running, then start them again.
@@ -115,4 +125,7 @@ upgrade)
restart)
restart "$@"
;;
+tail)
+ logtail "$@"
+ ;;
esac
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gitlab-ce.git/commitdiff/1a0e93df7d687f209ad54491719174d5407c42cc
More information about the pld-cvs-commit
mailing list