Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2870196
D25293.1736774696.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25293.1736774696.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 13, 13:24 (1 w, 12 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1113269
Default Alt Text
D25293.1736774696.diff (1 KB)
Attached To
Mode
D25293: Diviner: add a minimal systemd example
Attached
Detach File
Event Timeline
Log In to Comment