Ai
1 Star 0 Fork 0

g1a22/mirror-gitlab-org-gitlab-ce

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
web 788 Bytes
一键复制 编辑 原始数据 按行查看 历史
Jacob Vosmaer 提交于 2016-01-14 22:08 +08:00 . Improve bin/ launchers
#!/bin/sh
cd $(dirname $0)/..
app_root=$(pwd)
unicorn_pidfile="$app_root/tmp/pids/unicorn.pid"
unicorn_config="$app_root/config/unicorn.rb"
unicorn_cmd="bundle exec unicorn_rails -c $unicorn_config -E $RAILS_ENV"
get_unicorn_pid()
{
local pid=$(cat $unicorn_pidfile)
if [ -z "$pid" ] ; then
echo "Could not find a PID in $unicorn_pidfile"
exit 1
fi
unicorn_pid=$pid
}
start()
{
$unicorn_cmd -D
}
start_foreground()
{
$unicorn_cmd
}
stop()
{
get_unicorn_pid
kill -QUIT $unicorn_pid
}
reload()
{
get_unicorn_pid
kill -USR2 $unicorn_pid
}
case "$1" in
start)
start
;;
start_foreground)
start_foreground
;;
stop)
stop
;;
reload)
reload
;;
*)
echo "Usage: RAILS_ENV=your_env $0 {start|stop|reload}"
;;
esac
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gyiang/mirror-gitlab-org-gitlab-ce.git
git@gitee.com:gyiang/mirror-gitlab-org-gitlab-ce.git
gyiang
mirror-gitlab-org-gitlab-ce
mirror-gitlab-org-gitlab-ce
master

搜索帮助