mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-12 15:34:47 +02:00
Add two systemd unit files in extras/startup:
Use extras/startup/unrealircd.service if you want a system-wide unit file, which is normally what people tend to use. The benefit of this is that it allows setting some security options. Use extras/startup/unrealircd_user.service if you want a user unit file. This works if you don't have root on the machine.
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
# Systemd service for UnrealIRCd
|
||||
# To use this:
|
||||
# 1) Adjust user/group/paths under [Service] if needed.
|
||||
# 2) Then run the following commands as root:
|
||||
# cp -av unrealircd.service /etc/systemd/system/
|
||||
# systemctl daemon-reload
|
||||
# systemctl enable unrealircd.service
|
||||
# systemctl start unrealircd.service
|
||||
|
||||
[Unit]
|
||||
Description=UnrealIRCd
|
||||
Documentation=https://www.unrealircd.org/
|
||||
Description=UnrealIRCd IRC Server
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
# If needed, change 'ircd' to your unrealircd user and adjust paths:
|
||||
User=ircd
|
||||
Group=ircd
|
||||
ExecStart=/home/ircd/unrealircd/bin/unrealircd -F
|
||||
|
||||
# These settings should be fine for everyone
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
LimitNOFILE=65536
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
ExecStop=/bin/kill -TERM $MAINPID
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectKernelModules=true
|
||||
ProtectControlGroups=true
|
||||
LockPersonality=true
|
||||
MemoryDenyWriteExecute=true
|
||||
RestrictRealtime=true
|
||||
ProtectSystem=strict
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,37 @@
|
||||
# Systemd service for UnrealIRCd (user service)
|
||||
#
|
||||
# This is the USER service. You can use this if you don't have root
|
||||
# on the machine (otherwise, people usually use the other
|
||||
# unrealircd.service system unit instead).
|
||||
#
|
||||
# To install:
|
||||
# 1) Adjust the ExecStart= line below, if your unrealircd isn't
|
||||
# installed in ~/unrealircd/
|
||||
# 2) Then run the following commands (as a regular user):
|
||||
# loginctl enable-linger
|
||||
# mkdir -p ~/.config/systemd/user
|
||||
# cp unrealircd_user.service ~/.config/systemd/user/unrealircd.service
|
||||
# systemctl --user daemon-reload
|
||||
# systemctl --user enable unrealircd.service
|
||||
# systemctl --user start unrealircd.service
|
||||
|
||||
[Unit]
|
||||
Description=UnrealIRCd
|
||||
Documentation=https://www.unrealircd.org/
|
||||
Description=UnrealIRCd IRC Server (user service)
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
# Adjust this if unrealircd is installed somewhere else:
|
||||
ExecStart=%h/unrealircd/bin/unrealircd -F
|
||||
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
LimitNOFILE=65536
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
ExecStop=/bin/kill -TERM $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Reference in New Issue
Block a user