Skip to content

Commit 4db519d

Browse files
author
Soubinan
committed
Update template: Servarr
1 parent 50430a9 commit 4db519d

File tree

2 files changed

+27
-12
lines changed

2 files changed

+27
-12
lines changed

.github/workflows/builder.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,17 @@ jobs:
7070
if: github.event_name != 'schedule' || (steps.version-check.outputs.SUBMITTED_BUILD_ID != steps.version-check.outputs.CHECKED_BUILD_ID && github.event_name == 'schedule')
7171
run: |
7272
sudo apt-get update -y
73-
sudo apt-get install -y debootstrap squashfs-tools jq wget curl unzip
73+
sudo apt-get install -y debootstrap squashfs-tools jq wget curl unzip python3 python3-pip
7474
sudo snap install distrobuilder --classic
7575
mkdir -p /tmp/output/${{inputs.app_name}}
7676
mkdir -p /tmp/cache/${{inputs.app_name}}
7777
wget $(curl -s https://api.github.com/repos/Orange-OpenSource/hurl/releases/latest |jq -r '.assets[] | select(.name|test("amd64.deb")) | .browser_download_url') -O /tmp/hurl_amd64.deb
7878
sudo apt-get install -y /tmp/hurl_amd64.deb
7979
sudo -v ; curl https://rclone.org/install.sh | sudo bash
80+
pip install jinja2-cli
8081
81-
- uses: actions/setup-python@v5
82-
with:
83-
python-version: '3.12'
84-
cache: 'pip' # caching pip dependencies
82+
- name: Build Distrobuilder template
8583
- run: |
86-
pip install jinja2-cli
8784
jinja2 ${{github.workspace}}/${{inputs.config_path}} -D APP_NAME="${{ inputs.app_name }}" -D EXPOSED_PORTS="${{ inputs.app_ports }}" > ${{github.workspace}}/lxc-template.yml
8885
8986
- name: Build Image

templates/servarr.yml.j2

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
User={{ arr }}
2424
Group=media
2525
Type=simple
26-
2726
ExecStart=/opt/{{ arr | capitalize }}/{{ arr | capitalize }} -nobrowser -data=/var/lib/{{ arr }}/
2827
TimeoutStopSec=20
2928
KillMode=process
@@ -42,7 +41,6 @@
4241
User=flaresolverr
4342
Group=media
4443
Type=simple
45-
4644
ExecStart=/opt/FlareSolverr/venv/bin/python -u /opt/FlareSolverr/src/flaresolverr.py
4745
TimeoutStopSec=20
4846
KillMode=process
@@ -61,7 +59,6 @@
6159
User=bazarr
6260
Group=media
6361
Type=simple
64-
6562
ExecStart=/opt/bazarr/venv/bin/python -u /opt/bazarr/bazarr.py
6663
TimeoutStopSec=20
6764
KillMode=process
@@ -80,13 +77,30 @@
8077
User=qbittorrent
8178
Group=media
8279
Type=simple
83-
8480
ExecStart=/usr/bin/qbittorrent-nox --daemon --first-and-last --skip-dialog=true
8581
TimeoutStopSec=20
8682
KillMode=process
8783
Restart=on-failure
8884
[Install]
8985
WantedBy=multi-user.target
86+
87+
- path: /etc/systemd/system/sabnzbdplus.service
88+
generator: dump
89+
mode: 0440
90+
content: |-
91+
[Unit]
92+
Description=SABnzbdplus Daemon
93+
After=syslog.target network.target
94+
[Service]
95+
User=sabnzbdplus
96+
Group=media
97+
Type=simple
98+
ExecStart=/usr/bin/sabnzbdplus -s 0.0.0.0:8081
99+
TimeoutStopSec=20
100+
KillMode=process
101+
Restart=on-failure
102+
[Install]
103+
WantedBy=multi-user.target
90104
{% endblock dumps %}
91105
{# Set packages to be installed #}
92106
{% block packages %}
@@ -103,6 +117,7 @@
103117
- unrar-free
104118
- unzip
105119
- qbittorrent-nox
120+
- sabnzbdplus
106121
action: install
107122
{% endblock packages %}
108123
{# Set required repositories for packages to be installed #}
@@ -175,9 +190,12 @@
175190
systemctl enable bazarr.service
176191
rm -rf /opt/*.zip
177192

178-
mkdir /opt/qbittorrent
179-
useradd --home-dir /opt/qbittorrent qbittorrent
193+
useradd -m --home-dir /opt/qbittorrent qbittorrent
180194
usermod -aG media qbittorrent
181195
systemctl enable qbittorrent.service
196+
197+
useradd -m --home-dir /opt/sabnzbdplus sabnzbdplus
198+
usermod -aG media sabnzbdplus
199+
systemctl enable sabnzbdplus.service
182200
{% endblock post_files %}
183201
{# *** End of configuration block *** #}

0 commit comments

Comments
 (0)