chore: add daemon unit

This commit is contained in:
Evgenii Alekseev 2023-12-28 15:24:14 +02:00
parent e40b773029
commit 29c8c4bfd7
4 changed files with 23 additions and 3 deletions

View File

@ -25,6 +25,15 @@ Long answer
The idea is to install the package as usual, create working directory tree, create configuration for ``sudo`` and ``devtools``. Detailed description of the setup instruction can be found :doc:`here <setup>`.
Run as daemon
"""""""""""""
The alternative way (though not recommended) is to run service instead of timer:
.. code-block:: shell
systemctl enable --now ahriman-daemon@x86_64-aur-clone
How to validate settings
^^^^^^^^^^^^^^^^^^^^^^^^
@ -473,7 +482,7 @@ There is special ``repo-daemon`` subcommand which emulates systemd timer and wil
docker run --privileged -v /path/to/local/repo:/var/lib/ahriman arcan1s/ahriman:latest repo-daemon
This command uses same rules as ``repo-update``, thus, e.g. requires ``--privileged`` flag. Chech also `examples <https://github.com/arcan1s/ahriman/tree/master/recipes/daemon>`__.
This command uses same rules as ``repo-update``, thus, e.g. requires ``--privileged`` flag. Check also `examples <https://github.com/arcan1s/ahriman/tree/master/recipes/daemon>`__.
Web service setup
^^^^^^^^^^^^^^^^^

View File

@ -0,0 +1,11 @@
[Unit]
Description=ArcH linux ReposItory MANager (%i)
[Service]
Type=simple
ExecStart=/usr/bin/ahriman --repository-id "%I" repo-daemon --no-changes --refresh
User=ahriman
Group=ahriman
[Install]
WantedBy=multi-user.target

View File

@ -4,4 +4,4 @@ Description=ArcH linux ReposItory MANager (%i)
[Service]
ExecStart=/usr/bin/ahriman --repository-id "%I" repo-update --no-changes --refresh
User=ahriman
Group=ahriman
Group=ahriman

View File

@ -6,4 +6,4 @@ OnCalendar=daily
RandomizedDelaySec=3600
[Install]
WantedBy=timers.target
WantedBy=timers.target