diff options
author | Yixun Lan <dlan@gentoo.org> | 2022-08-15 16:28:08 +0800 |
---|---|---|
committer | Yixun Lan <dlan@gentoo.org> | 2022-08-15 16:30:04 +0800 |
commit | 8cab9d61c56949f4c96b07fd3705788a0ac31557 (patch) | |
tree | 67302a5ff07261180300777411c80ef37e2f5c2d /net-vpn | |
parent | dev-python/coverage: Remove old (diff) | |
download | gentoo-8cab9d61c56949f4c96b07fd3705788a0ac31557.tar.gz gentoo-8cab9d61c56949f4c96b07fd3705788a0ac31557.tar.bz2 gentoo-8cab9d61c56949f4c96b07fd3705788a0ac31557.zip |
net-vpn/headscale: correct permission issue
make sure the path of headscale has right permission
Signed-off-by: Yixun Lan <dlan@gentoo.org>
Diffstat (limited to 'net-vpn')
-rw-r--r-- | net-vpn/headscale/files/config-socket.patch | 6 | ||||
-rw-r--r-- | net-vpn/headscale/files/headscale.initd | 12 |
2 files changed, 12 insertions, 6 deletions
diff --git a/net-vpn/headscale/files/config-socket.patch b/net-vpn/headscale/files/config-socket.patch index 4d6c90e3f0f5..73de6b6578d1 100644 --- a/net-vpn/headscale/files/config-socket.patch +++ b/net-vpn/headscale/files/config-socket.patch @@ -1,13 +1,13 @@ diff --git a/config-example.yaml b/config-example.yaml -index dee25cb..007d8ec 100644 +index d3d155e..a070c22 100644 --- a/config-example.yaml +++ b/config-example.yaml -@@ -202,7 +202,7 @@ dns_config: +@@ -208,7 +208,7 @@ dns_config: # Unix socket used for the CLI to connect without authentication # Note: for local development, you probably want to change this to: # unix_socket: ./headscale.sock -unix_socket: /var/run/headscale.sock -+unix_socket: /run/headscale.sock ++unix_socket: /run/headscale/headscale.sock unix_socket_permission: "0770" # # headscale supports experimental OpenID connect support, diff --git a/net-vpn/headscale/files/headscale.initd b/net-vpn/headscale/files/headscale.initd index 5a98c0e6cb34..f43b3a55af38 100644 --- a/net-vpn/headscale/files/headscale.initd +++ b/net-vpn/headscale/files/headscale.initd @@ -8,6 +8,7 @@ user="${HEADSCALE_USER}:${HEADSCALE_GROUP}" directory="/var/lib/headscale" output_log="/var/log/headscale.log" error_log="/var/log/headscale.log" +private_key="/var/lib/headscale/private.key" start_stop_daemon_args="--user \"${user}\" ${HEADSCALE_OPTIONS} --background" @@ -23,7 +24,12 @@ start_pre() { fi checkpath -d -m 700 -o "${user}" /run/headscale /var/lib/headscale - checkpath -f -m 600 -o "${user}" /var/lib/headscale/db.sqlite /var/log/headscale.log - checkpath -f -m 600 -o "${user}" /etc/headscale/config.yaml -} + checkpath -f -m 600 -o "${user}" \ + /var/lib/headscale/db.sqlite \ + /var/log/headscale.log \ + /etc/headscale/config.yaml + if [[ -f ${private_key} ]]; then + checkpath -f -m 600 -o "${user}" ${private_key} + fi +} |