gogs: simplify directory creation
This commit is contained in:
parent
bad9ba3886
commit
45241f4758
2 changed files with 12 additions and 17 deletions
18
srcpkgs/gogs/files/gogs/run
Executable file → Normal file
18
srcpkgs/gogs/files/gogs/run
Executable file → Normal file
|
@ -1,16 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
[ -r ./conf ] && . ./conf
|
export USER=gogs
|
||||||
: ${USER:=gogs}
|
export HOME=/srv/gogs
|
||||||
: ${GROUP:=gogs}
|
exec chpst -u gogs:gogs -P gogs web --config /etc/gogs.ini 2>&1
|
||||||
: ${HOME:=/srv/gogs}
|
|
||||||
exec 2>&1
|
|
||||||
cd $HOME
|
|
||||||
export HOME
|
|
||||||
export USER
|
|
||||||
|
|
||||||
for f in ${HOME}/repo ${HOME}/data/avatars ${HOME}/data/attachment /var/log/gogs; do
|
|
||||||
mkdir -p $f
|
|
||||||
chown ${USER}:${GROUP} $f
|
|
||||||
done
|
|
||||||
|
|
||||||
exec chpst -u $USER:$GROUP -P gogs web --config /etc/gogs.ini
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
# Template file for 'gogs'
|
# Template file for 'gogs'
|
||||||
pkgname=gogs
|
pkgname=gogs
|
||||||
version=0.11.79
|
version=0.11.79
|
||||||
revision=1
|
revision=2
|
||||||
build_style=go
|
build_style=go
|
||||||
go_import_path="github.com/gogs/gogs"
|
go_import_path=github.com/gogs/gogs
|
||||||
go_build_tags="sqlite pam cert"
|
go_build_tags="sqlite pam cert"
|
||||||
hostmakedepends="git curl"
|
hostmakedepends="git curl"
|
||||||
makedepends="pam-devel"
|
makedepends="pam-devel"
|
||||||
|
@ -20,6 +20,13 @@ system_accounts="gogs"
|
||||||
gogs_homedir="/srv/gogs"
|
gogs_homedir="/srv/gogs"
|
||||||
gogs_shell="/bin/bash"
|
gogs_shell="/bin/bash"
|
||||||
|
|
||||||
|
make_dirs="
|
||||||
|
/srv/gogs 0755 gogs gogs
|
||||||
|
/srv/gogs/repo 0755 gogs gogs
|
||||||
|
/srv/gogs/data/avatars 0755 gogs gogs
|
||||||
|
/srv/gogs/data/attachment 0755 gogs gogs
|
||||||
|
/var/log/gogs 0755 gogs gogs"
|
||||||
|
|
||||||
export CGO_ENABLED=1
|
export CGO_ENABLED=1
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue