mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 07:33:48 +02:00
goatcounter: update to 2.2.3, add service
This commit is contained in:
parent
a8d8f5a7e5
commit
d9954e0322
4 changed files with 35 additions and 3 deletions
16
srcpkgs/goatcounter/files/README.voidlinux
Normal file
16
srcpkgs/goatcounter/files/README.voidlinux
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
The system service /etc/sv/goatcounter runs goatcounter as system user _goatcounter.
|
||||||
|
|
||||||
|
By default sqlite database is used. The database will be stored in
|
||||||
|
/var/db/goatcounter/db.sqlite3.
|
||||||
|
|
||||||
|
To initialize the database, make sure you run goatcounter as the _goatcounter user:
|
||||||
|
|
||||||
|
$ sudo -u _goatcounter goatcounter db create site \
|
||||||
|
-user.email 'admin@domain.name' \
|
||||||
|
-vhost site.name \
|
||||||
|
-db sqlite+/var/db/goatcounter/db.sqlite3
|
||||||
|
|
||||||
|
By default the service listens on 5000 port and does not use TLS. In production
|
||||||
|
envirnment you must adjust service config by creating /var/goatcounter/conf
|
||||||
|
|
||||||
|
OPTS=-listen ... -db ...
|
2
srcpkgs/goatcounter/files/goatcounter/log/run
Executable file
2
srcpkgs/goatcounter/files/goatcounter/log/run
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
exec logger -p daemon.notice -t goatcounter
|
7
srcpkgs/goatcounter/files/goatcounter/run
Executable file
7
srcpkgs/goatcounter/files/goatcounter/run
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
[ -r ./conf ] && . ./conf
|
||||||
|
|
||||||
|
: "${OPTS:=-db sqlite+/var/db/goatcounter/db.sqlite3?_busy_timeout=200&_journal_mode=wal&cache=shared -listen :5000 -public-port 5000 -tls none}"
|
||||||
|
|
||||||
|
exec chpst -u _goatcounter goatcounter serve ${OPTS}
|
|
@ -1,9 +1,9 @@
|
||||||
# Template file for 'goatcounter'
|
# Template file for 'goatcounter'
|
||||||
pkgname=goatcounter
|
pkgname=goatcounter
|
||||||
version=2.0.3
|
version=2.2.3
|
||||||
revision=1
|
revision=1
|
||||||
build_style=go
|
build_style=go
|
||||||
go_import_path=zgo.at/goatcounter
|
go_import_path=zgo.at/goatcounter/v2
|
||||||
go_package="${go_import_path}/cmd/goatcounter"
|
go_package="${go_import_path}/cmd/goatcounter"
|
||||||
go_ldflags="-X zgo.at/goatcounter.Version=${version}"
|
go_ldflags="-X zgo.at/goatcounter.Version=${version}"
|
||||||
depends="tzdata"
|
depends="tzdata"
|
||||||
|
@ -12,4 +12,11 @@ maintainer="Martin Tournoij <martin@arp242.net>"
|
||||||
license="EUPL-1.2"
|
license="EUPL-1.2"
|
||||||
homepage="https://www.goatcounter.com/"
|
homepage="https://www.goatcounter.com/"
|
||||||
distfiles="https://github.com/zgoat/goatcounter/archive/v${version}.tar.gz"
|
distfiles="https://github.com/zgoat/goatcounter/archive/v${version}.tar.gz"
|
||||||
checksum=d7477240602c4d6522fb528276378879cda35dea0ba4b174143e36a410398023
|
checksum=5b3b07afda42752d7c9600a8671bbb30e70a98c656505eda99a4e67b309a94fc
|
||||||
|
system_accounts="_goatcounter"
|
||||||
|
make_dirs="/var/db/goatcounter 0750 _goatcounter _goatcounter"
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
vsv goatcounter
|
||||||
|
vdoc $FILESDIR/README.voidlinux
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue