Refactor: Autobrr (#6302)

* Refactor

* Update

* Update autobrr.sh
This commit is contained in:
Slaviša Arežina
2025-07-29 08:30:32 +02:00
committed by GitHub
parent 5a889d8fc6
commit 34da66600d
2 changed files with 27 additions and 23 deletions

View File

@@ -13,10 +13,9 @@ setting_up_container
network_check
update_os
msg_info "Installing Autobrr"
curl -fsSL "$(curl -fsSL https://api.github.com/repos/autobrr/autobrr/releases/latest | grep download | grep linux_x86_64 | cut -d\" -f4)" -o $(basename "$(curl -fsSL https://api.github.com/repos/autobrr/autobrr/releases/latest | grep download | grep linux_x86_64 | cut -d\" -f4)")
tar -C /usr/local/bin -xzf autobrr*.tar.gz
rm -rf autobrr*.tar.gz
fetch_and_deploy_gh_release "autobrr" "autobrr/autobrr" "prebuild" "latest" "/usr/local/bin" "autobrr_*_linux_x86_64.tar.gz"
msg_info "Configuring Autobrr"
mkdir -p /root/.config/autobrr
cat <<EOF >>/root/.config/autobrr/config.toml
# https://autobrr.com/configuration/autobrr
@@ -25,21 +24,24 @@ port = 7474
logLevel = "DEBUG"
sessionSecret = "$(openssl rand -base64 24)"
EOF
msg_ok "Installed Autobrr"
msg_ok "Configured Autobrr"
msg_info "Creating Service"
service_path="/etc/systemd/system/autobrr.service"
echo "[Unit]
cat <<EOF >/etc/systemd/system/autobrr.service
[Unit]
Description=autobrr service
After=syslog.target network-online.target
[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/local/bin/autobrr --config=/root/.config/autobrr/
[Install]
WantedBy=multi-user.target" >$service_path
systemctl enable --now -q autobrr.service
WantedBy=multi-user.target
EOF
systemctl enable --now -q autobrr
msg_ok "Created Service"
motd_ssh