From d03fd9024740e1caf22d1aaebb4f97621e01af6d Mon Sep 17 00:00:00 2001 From: renpan <530933208@qq.com> Date: Thu, 26 Feb 2015 09:51:57 +0800 Subject: [PATCH] do some modify for supervisor run error maybe you will find it, so i find it too, so i fix it. but not the best solution way, and i am waiting the author will modify the start scripts, and modify the gogs import conf way. i will update it when next big version. --- scripts/gogs_supervisord.sh | 2 +- scripts/start_for_supervisord.sh | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 scripts/start_for_supervisord.sh diff --git a/scripts/gogs_supervisord.sh b/scripts/gogs_supervisord.sh index 016675848..f2e376ed7 100755 --- a/scripts/gogs_supervisord.sh +++ b/scripts/gogs_supervisord.sh @@ -7,7 +7,7 @@ EXEPATH='/usr/bin/gogs_start' if [ ! -f $EXEPATH ]; then gogs_scripts_path=$(cd `dirname $0`; pwd) echo $gogs_scripts_path - sudo ln -s $gogs_scripts_path'/start.sh' /usr/bin/gogs_start + sudo ln -s $gogs_scripts_path'/start_for_supervisord.sh' /usr/bin/gogs_start fi LOGDIR="log" diff --git a/scripts/start_for_supervisord.sh b/scripts/start_for_supervisord.sh new file mode 100755 index 000000000..2c95c0a8a --- /dev/null +++ b/scripts/start_for_supervisord.sh @@ -0,0 +1,9 @@ +#!/bin/sh +IFS=' + ' +PATH=/bin:/usr/bin:/usr/local/bin +USER=$(whoami) +HOME=$(grep "^$USER:" /etc/passwd | cut -d: -f6) +export USER HOME PATH + +cd "$HOME/gogs" && exec ./gogs web \ No newline at end of file