Linux/Systemd: Difference between revisions

From Wiki
(Die Seite wurde neu angelegt: „== systemctl == <pre> systemctl list-units systemctl status NAME systemctl start NAME systemctl stop NAME systemctl restart NAME systemctl reload NAME syste…“)
 
No edit summary
Line 14: Line 14:
systemctl disable NAME
systemctl disable NAME


</pre>
<pre>
[Service]
Type=forking
PrivateTmp=yes
User=nobody
Group=nobody
# Run ExecStartPre with root-permissions
PermissionsStartOnly=true
ExecStartPre=-/usr/bin/mkdir /var/run/dhis
ExecStartPre=/usr/bin/chown -R nobody:nobody /var/run/dhis/
# Run ExecStart with User=nobody / Group=nobody
ExecStart=/usr/sbin/dhid -P /var/run/dhis/dhid.pid
PIDFile=/var/run/dhis/dhid.pid
</pre>
</pre>

Revision as of 09:49, 30 August 2016

systemctl

systemctl list-units

systemctl status NAME

systemctl start NAME
systemctl stop NAME
systemctl restart NAME
systemctl reload NAME

systemctl list-unit-files
systemctl enable NAME
systemctl disable NAME

[Service]
Type=forking
PrivateTmp=yes
User=nobody
Group=nobody
# Run ExecStartPre with root-permissions
PermissionsStartOnly=true
ExecStartPre=-/usr/bin/mkdir /var/run/dhis
ExecStartPre=/usr/bin/chown -R nobody:nobody /var/run/dhis/
# Run ExecStart with User=nobody / Group=nobody
ExecStart=/usr/sbin/dhid -P /var/run/dhis/dhid.pid
PIDFile=/var/run/dhis/dhid.pid