Refactor: Headscale (#6180)

This commit is contained in:
Slaviša Arežina
2025-07-24 12:43:32 +02:00
committed by GitHub
parent de1a93bf6d
commit 1f51e96cb1
2 changed files with 10 additions and 14 deletions

View File

@@ -13,19 +13,16 @@ setting_up_container
network_check
update_os
RELEASE=$(curl -fsSL https://api.github.com/repos/juanfont/headscale/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
msg_info "Installing ${APPLICATION} v${RELEASE}"
curl -fsSL "https://github.com/juanfont/headscale/releases/download/v${RELEASE}/headscale_${RELEASE}_linux_amd64.deb" -o "headscale_${RELEASE}_linux_amd64.deb"
$STD dpkg -i headscale_${RELEASE}_linux_amd64.deb
fetch_and_deploy_gh_release "headscale" "juanfont/headscale" "binary"
msg_info "Starting service"
systemctl enable -q --now headscale
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed ${APPLICATION} v${RELEASE}"
msg_ok "Service started"
motd_ssh
customize
msg_info "Cleaning up"
rm headscale_${RELEASE}_linux_amd64.deb
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"