Page MenuHomePhorge

D25293.1737161003.diff
No OneTemporary

D25293.1737161003.diff

diff --git a/src/docs/user/configuration/managing_daemons.diviner b/src/docs/user/configuration/managing_daemons.diviner
--- a/src/docs/user/configuration/managing_daemons.diviner
+++ b/src/docs/user/configuration/managing_daemons.diviner
@@ -46,6 +46,62 @@
NOTE: When you upgrade Phorge or change configuration, you should restart
the daemons by running `phd restart`.
+Automatically start phd
+=======================
+
+NOTE: If you are opinionated against systemd, cover the eyes of your children
+right now!1!
+
+Computers are good in automatically starting stuff, thanks to the invention
+of the "init system".
+
+Phorge virtually supports any init system. Which one is yours? Don't worry.
+If you don't know, it's systemd.
+
+We propose a minimal systemd configuration file, following some assumptions:
+
+- your lovely Phorge is installed `/somewhere`
+- you have a database service called `mariadb`
+- you have a dedicated Unix user called `daemon-user` - coming from
+ @{article:Diffusion User Guide}
+
+With the above assumptions, create this configuration file as super-user:
+
+```lang=ini,name=/etc/systemd/system/phorge-phd.service
+[Unit]
+Description=Phorge Daemons
+Documentation=https://we.phorge.it/book/phorge/article/managing_daemons/
+After=syslog.target network.target mariadb.service
+
+[Service]
+Type=forking
+User=daemon-user
+Group=daemon-user
+ExecStart=/somewhere/phorge/bin/phd start
+ExecStop=/somewhere/phorge/bin/phd stop
+
+[Install]
+WantedBy=multi-user.target
+```
+
+To install this new systemd configuration, execute these commands as
+super-user:
+
+```
+systemctl daemon-reload
+systemctl enable --now phorge-phd
+```
+
+Now the process has started and will survive after any reboot.
+
+To check if everything is OK:
+
+```
+systemctl status phorge-phd
+```
+
+Anything else can be explored in depth by reading the systemd documentation.
+
= Daemon Console =
You can view status and debugging information for daemons in the Daemon Console

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 18, 00:43 (3 d, 51 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1113269
Default Alt Text
D25293.1737161003.diff (1 KB)

Event Timeline