Skip to content

Commit 71d8237

Browse files
author
Sameer Naik
committedSep 20, 2014
shutdown the container gracefully, closes #149
1 parent 68c4885 commit 71d8237

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
 

‎Changelog.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
**latest**
4+
- shutdown the container gracefully
5+
36
**7.2.2**
47
- upgrade to gitlab-ce 7.2.2
58
- added GITLAB_HTTPS_HSTS_ENABLED configuration option (advanced config)

‎assets/init

+20
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22
set -e
33

4+
trap appStop SIGINT SIGTERM
5+
46
GITLAB_INSTALL_DIR="/home/git/gitlab"
57
GITLAB_DATA_DIR="/home/git/data"
68
GITLAB_BACKUP_DIR="${GITLAB_BACKUP_DIR:-$GITLAB_DATA_DIR/backups}"
@@ -586,6 +588,24 @@ EOF
586588
tail -F /var/log/nginx/gitlab_access.log
587589
}
588590

591+
appStop() {
592+
echo ""
593+
/etc/init.d/gitlab stop
594+
echo "Stopping crond..."
595+
supervisorctl stop cron >/dev/null
596+
echo "Stopping sshd..."
597+
supervisorctl stop sshd >/dev/null
598+
echo "Stopping nginx..."
599+
supervisorctl stop nginx >/dev/null
600+
echo "Stopping mysqld..."
601+
supervisorctl stop mysqld >/dev/null
602+
echo "Stopping redis-server..."
603+
supervisorctl stop redis-server >/dev/null
604+
echo "Stopping supervisord..."
605+
kill -15 $(cat /var/run/supervisord.pid)
606+
exit
607+
}
608+
589609
appSanitize () {
590610
echo "Checking repository directories permissions..."
591611
chmod -R ug+rwX,o-rwx ${GITLAB_DATA_DIR}/repositories/

0 commit comments

Comments
 (0)
Please sign in to comment.