diff options
Diffstat (limited to 'systemd')
-rw-r--r-- | systemd/pacredir.service | 4 | ||||
-rw-r--r-- | systemd/pacserve-announce.service.in | 23 | ||||
-rw-r--r-- | systemd/pacserve.service | 7 | ||||
-rw-r--r-- | systemd/sysusers.conf | 2 |
4 files changed, 31 insertions, 5 deletions
diff --git a/systemd/pacredir.service b/systemd/pacredir.service index ed5e45a..9a5801f 100644 --- a/systemd/pacredir.service +++ b/systemd/pacredir.service @@ -1,4 +1,4 @@ -# (C) 2013-2024 by Christian Hesse <mail@eworm.de> +# (C) 2013-2025 by Christian Hesse <mail@eworm.de> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -7,9 +7,9 @@ [Unit] Description=Redirect pacman requests via avahi service +Documentation=https://pacredir.eworm.de/ Requires=avahi-daemon.service After=avahi-daemon.service network.target network-online.target -Documentation=https://github.com/eworm-de/pacredir#pacredir [Service] Type=notify diff --git a/systemd/pacserve-announce.service.in b/systemd/pacserve-announce.service.in new file mode 100644 index 0000000..c6f9828 --- /dev/null +++ b/systemd/pacserve-announce.service.in @@ -0,0 +1,23 @@ +# (C) 2013-2025 by Christian Hesse <mail@eworm.de> +# Markus Weippert <markus@gekmihesg.de> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +[Unit] +Description=Announce pacman database files and package archives +Documentation=https://pacredir.eworm.de/ +After=avahi-daemon.service pacserve.service +BindsTo=pacserve.service +Requisite=avahi-daemon.service + +[Service] +EnvironmentFile=/etc/pacserve.conf +ExecStart=/usr/bin/avahi-publish -s "pacserve on %l" _pacserve-%ID%-%ARCH%._tcp ${PORT} +DynamicUser=on +ProtectSystem=full +ProtectHome=on +PrivateDevices=on +NoNewPrivileges=on diff --git a/systemd/pacserve.service b/systemd/pacserve.service index d5e064d..2af4c1e 100644 --- a/systemd/pacserve.service +++ b/systemd/pacserve.service @@ -1,4 +1,4 @@ -# (C) 2013-2024 by Christian Hesse <mail@eworm.de> +# (C) 2013-2025 by Christian Hesse <mail@eworm.de> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -7,10 +7,13 @@ [Unit] Description=Serve pacman database files and package archives +Documentation=https://pacredir.eworm.de/ After=systemd-tmpfiles-setup.service network.target +Upholds=pacserve-announce.service [Service] -ExecStart=/usr/bin/pacserve /run/pacserve/ --ipv6 --port 7078 --no-listing --index empty +EnvironmentFile=/etc/pacserve.conf +ExecStart=/usr/bin/pacserve /run/pacserve/ --ipv6 --port ${PORT} --no-listing --index empty BindReadOnlyPaths=/var/cache/pacman/pkg:/run/pacserve/pkg /var/lib/pacman/sync:/run/pacserve/db DynamicUser=on ProtectSystem=full diff --git a/systemd/sysusers.conf b/systemd/sysusers.conf index cd2e81c..ced5210 100644 --- a/systemd/sysusers.conf +++ b/systemd/sysusers.conf @@ -1 +1 @@ -u pacredir - "redirect pacman requests" +u! pacredir - "redirect pacman requests" |