gogs: simplify directory creation
This commit is contained in:
parent
bad9ba3886
commit
45241f4758
|
@ -1,16 +1,4 @@
|
|||
#!/bin/sh
|
||||
[ -r ./conf ] && . ./conf
|
||||
: ${USER:=gogs}
|
||||
: ${GROUP:=gogs}
|
||||
: ${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
|
||||
export USER=gogs
|
||||
export HOME=/srv/gogs
|
||||
exec chpst -u gogs:gogs -P gogs web --config /etc/gogs.ini 2>&1
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Template file for 'gogs'
|
||||
pkgname=gogs
|
||||
version=0.11.79
|
||||
revision=1
|
||||
revision=2
|
||||
build_style=go
|
||||
go_import_path="github.com/gogs/gogs"
|
||||
go_import_path=github.com/gogs/gogs
|
||||
go_build_tags="sqlite pam cert"
|
||||
hostmakedepends="git curl"
|
||||
makedepends="pam-devel"
|
||||
|
@ -20,6 +20,13 @@ system_accounts="gogs"
|
|||
gogs_homedir="/srv/gogs"
|
||||
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
|
||||
|
||||
post_install() {
|
||||
|
|
Loading…
Reference in New Issue