Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New package: headscale-0.16.4 #39864

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions srcpkgs/headscale/files/headscale/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

[ ! -d /run/headscale ] && install -d -m0700 -o _headscale -g _headscale /run/headscale

[ -r conf ] && . ./conf

exec chpst -u _headscale:_headscale /usr/bin/headscale serve -c "${CONFIG:-/etc/headscale/config.yaml}"
34 changes: 34 additions & 0 deletions srcpkgs/headscale/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Template file for 'headscale'
pkgname=headscale
version=0.16.4
revision=1
build_style=go
go_import_path=github.com/juanfont/headscale
go_package="cmd/headscale/headscale.go"
go_ldflags="-X ${go_import_path}/cmd/headscale/cli.Version=${version}"
short_desc="Self-hosted implementation of the Tailscale control server"
maintainer="teldra <teldra@rotce.de>"
license="BSD-3-Clause"
homepage="https://github.com/juanfont/headscale"
changelog="https://raw.githubusercontent.com/juanfont/headscale/main/CHANGELOG.md"
distfiles="https://github.com/juanfont/headscale/archive/refs/tags/v${version}.tar.gz"
checksum=0395478f9dde68aa8ca23be8df6ff636d47166981d0995e4e31a8c7db12df8e8
make_dirs="/var/run/headscale 0770 _headscale _headscale
/var/lib/headscale 0750 _headscale _headscale"
system_accounts="_headscale"
_headscale_homedir="/var/lib/headscale"
conf_files="/etc/headscale/config.yaml"

post_extract() {
vsed -e 's|/var/run/headscale.sock|/var/run/headscale/headscale.sock|' \
-e 's/disable_check_updates: false/disable_check_updates: true/' \
-i config-example.yaml
}

post_install() {
vsv headscale
vmkdir /etc/headscale
vinstall config-example.yaml 755 etc/headscale config.yaml
vsconf config-example.yaml
vlicense LICENSE
}