summarylogtreecommitdiffstats
path: root/gitlab-post.sh
blob: 1fd1760a3ac5b715e68bf818fc856b964eea14fb (plain)
1
2
3
4
5
6
7
8
#!/bin/bash

_ruby=$(pacman -Qiq gitlab | awk '{/^Depends On/ && match($0,/\<ruby[0-9.]*\>/,a)}END{print a[0]}')
_bundle=$(pacman -Qlq "$_ruby" | grep '/usr/bin/bundle\>')

cd /usr/share/webapps/gitlab
su -s /bin/sh gitlab -c "$(xargs < environment ) $_bundle exec rake db:migrate"
systemctl start gitlab.target