diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2017-12-18 23:57:06 +0000 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2017-12-18 23:57:06 +0000 |
commit | 80c876d85e9c94c4a289aa63dbdfda6ba4c4cb6a (patch) | |
tree | 71d452220ed60941fcb614e18df12d074d85001f /devel/gogs/files | |
parent | New port: net-im/telegram-desktop: Telegram Desktop messaging app (diff) |
devel/gogs: Changed user from gogs to git; Moved ini file under /usr/local/etc
PR: 224113
Submitted by: Dmitri Goutnik <dg@syrec.org> (maintainer)
Approved by: adamw (mentor)
Differential Revision: https://reviews.freebsd.org/D13469
Diffstat (limited to 'devel/gogs/files')
-rw-r--r-- | devel/gogs/files/gogs-rm-data.in | 3 | ||||
-rw-r--r-- | devel/gogs/files/gogs-service.in | 5 | ||||
-rw-r--r-- | devel/gogs/files/gogs.in | 4 | ||||
-rw-r--r-- | devel/gogs/files/patch-templates_install.tmpl | 11 | ||||
-rw-r--r-- | devel/gogs/files/pkg-message.in | 2 |
5 files changed, 17 insertions, 8 deletions
diff --git a/devel/gogs/files/gogs-rm-data.in b/devel/gogs/files/gogs-rm-data.in index a719903d16e7..4f27af6953e9 100644 --- a/devel/gogs/files/gogs-rm-data.in +++ b/devel/gogs/files/gogs-rm-data.in @@ -17,5 +17,4 @@ while true; do esac done -rm -rf %%GOGS_DBDIR%%/*/* %%GOGS_DBDIR%%/*/.ssh \ - %%GOGS_LOGDIR%%/* /var/log/gogs.log +rm -rf %%GOGS_DBDIR%%/*/* %%GOGS_LOGDIR%%/* /var/log/gogs.log diff --git a/devel/gogs/files/gogs-service.in b/devel/gogs/files/gogs-service.in index 9b9af0a01f83..b2413725184c 100644 --- a/devel/gogs/files/gogs-service.in +++ b/devel/gogs/files/gogs-service.in @@ -24,6 +24,7 @@ stop_cmd="%%PORTNAME%%_stop" load_rc_config ${name} : ${%%PORTNAME%%_enable="NO"} +: ${%%PORTNAME%%_config="%%ETCDIR%%/conf/app.ini"} is_process_running() { local pidfile=$1 @@ -43,11 +44,11 @@ stop_daemon() { return 1 fi export USER=%%GOGS_USER%% - export HOME=$(getent passwd %%GOGS_USER%% | cut -d: -f6) + export HOME=$(echo ~%%GOGS_USER%%) touch $logfile chmod 640 $logfile cd %%PREFIX%%/libexec/%%PORTNAME%% - /usr/sbin/daemon -P $pidfile -u %%GOGS_USER%% %%PREFIX%%/libexec/%%PORTNAME%%/%%PORTNAME%% web >>$logfile 2>&1 + /usr/sbin/daemon -P $pidfile -u %%GOGS_USER%% %%PREFIX%%/libexec/%%PORTNAME%%/%%PORTNAME%% web --config ${%%PORTNAME%%_config} >>$logfile 2>&1 if is_process_running $pidfile; then echo "started %%PORTNAME%% (pid=$(cat $pidfile))" else diff --git a/devel/gogs/files/gogs.in b/devel/gogs/files/gogs.in index dbcd5fc2ea62..8ca814466134 100644 --- a/devel/gogs/files/gogs.in +++ b/devel/gogs/files/gogs.in @@ -2,5 +2,5 @@ cd %%PREFIX%%/libexec/%%PORTNAME%% && USER=%%GOGS_USER%% \ -HOME=$(getent passwd %%GOGS_USER%% | cut -d: -f6) \ -su -m %%GOGS_USER%% -c './%%PORTNAME%% web' +HOME=$(echo ~%%GOGS_USER%%) \ +su -m %%GOGS_USER%% -c './%%PORTNAME%% web --config %%ETCDIR%%/conf/app.ini' diff --git a/devel/gogs/files/patch-templates_install.tmpl b/devel/gogs/files/patch-templates_install.tmpl index a48fb3eddac0..3c192233064e 100644 --- a/devel/gogs/files/patch-templates_install.tmpl +++ b/devel/gogs/files/patch-templates_install.tmpl @@ -1,4 +1,4 @@ ---- templates/install.tmpl.orig 2017-11-17 23:20:54 UTC +--- templates/install.tmpl.orig 2017-11-22 19:46:14 UTC +++ templates/install.tmpl @@ -8,12 +8,9 @@ <div class="ui attached segment"> @@ -37,3 +37,12 @@ <label for="run_user">{{.i18n.Tr "install.run_user"}}</label> <input id="run_user" name="run_user" value="{{.run_user}}" required> <span class="help">{{.i18n.Tr "install.run_user_helper"}}</span> +@@ -115,7 +112,7 @@ + <input id="app_url" name="app_url" value="{{.app_url}}" placeholder="e.g. https://try.gogs.io" required> + <span class="help">{{.i18n.Tr "install.app_url_helper"}}</span> + </div> +- <div class="inline required field"> ++ <div class="disabled inline required field"> + <label for="log_root_path">{{.i18n.Tr "install.log_root_path"}}</label> + <input id="log_root_path" name="log_root_path" value="{{.log_root_path}}" placeholder="log" required> + <span class="help">{{.i18n.Tr "install.log_root_path_helper"}}</span> diff --git a/devel/gogs/files/pkg-message.in b/devel/gogs/files/pkg-message.in index 4a8c6873d9d7..74418c6bd9c2 100644 --- a/devel/gogs/files/pkg-message.in +++ b/devel/gogs/files/pkg-message.in @@ -13,7 +13,7 @@ You can also run %%PORTNAME%% manually with a command: Connect to %%PORTNAME%% on the default port 3000: http://localhost:3000 -Configuration file is %%PREFIX%%/libexec/%%PORTNAME%%/custom/conf/app.ini. +Configuration file is %%ETCDIR%%/conf/app.ini. You can only edit it when %%PORTNAME%% isn't running. %%PORTNAME_FANCY%% needs an SSH daemon, so make sure sure you execute: |