# (C) 2013-2026 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

[Unit]
Description=Redirect pacman requests via mDNS Service Discovery
Documentation=https://pacredir.eworm.de/
Requires=systemd-resolved.service
After=network.target network-online.target systemd-resolved.service

[Service]
Type=notify
ExecStart=/usr/bin/pacredir
ExecReload=/usr/bin/kill -HUP $MAINPID
User=pacredir
ProtectSystem=full
ProtectHome=on
PrivateDevices=on
NoNewPrivileges=on
Restart=on-failure
RestartSec=2s

[Install]
WantedBy=multi-user.target
Also=pacserve.service
