Skip to content

Instantly share code, notes, and snippets.

@TehPeGaSuS
Last active February 26, 2024 00:49
Show Gist options
  • Save TehPeGaSuS/ebcb3ef2400cc91b14eb63cfeb2c2994 to your computer and use it in GitHub Desktop.
Save TehPeGaSuS/ebcb3ef2400cc91b14eb63cfeb2c2994 to your computer and use it in GitHub Desktop.
UnrealIRCd Systemd Service Units
#---------------------------------------------#
# Systemd Unit for UnrealIRCd #
# #
# NOTE: This was tested on Ubuntu 20.04+ #
#---------------------------------------------#------------------------------------------#
# INSTRUCTIONS #
# #
# Put this systemd unit inside the '/etc/systemd/system' folder and name it: #
# unrealircd.service #
# #
# Make the system aware of the service unit with the following command: #
# systemctl daemon-reload #
# #
#----------------------------------------------------------------------------------------#
# SYSTEMD COMMANDS TO MANAGE UNREALIRCD #
# #
# To start Unrealircd: systemctl start unrealircd.service #
# #
# To stop Unrealircd: systemctl stop unrealircd.service #
# #
# To reload Unrealircd: systemctl reload unrealircd.service #
# #
# To enable Unrealircd to start on boot: systemctl enable unrealircd.service #
# #
# To disable Unrealircd from starting on boot: systemctl disable unrealircd.service #
#----------------------------------------------------------------------------------------#
[Unit]
Description=UnrealIRCd IRC daemon
[Service]
#-------------------------------------------------------#
# Full path to UnrealIRCd installation directory. #
# This should be something like '/home/ircd/unrealircd' #
#-------------------------------------------------------#
WorkingDirectory=/home/ircd/unrealircd
#------------------------------------------------------------------------#
# Full command to start UnrealIRCd #
# This should be something like '/home/ircd/unrealircd/unrealircd start' #
#------------------------------------------------------------------------#
ExecStart=/home/ircd/unrealircd/unrealircd start
#-------------------------------------------------------------------------#
# Full command to rehash UnrealIRCd #
# This should be something like '/home/ircd/unrealircd/unrealircd rehash' #
#-------------------------------------------------------------------------#
ExecReload=/home/ircd/unrealircd/unrealircd rehash
#------------------------------------------------------------------#
# User and group where Anope is currenly installed #
# When installed from source, usually, user and group are the same #
#------------------------------------------------------------------#
User=ircd
#
Group=ircd
#---------------------------#
# Recommended type: forking #
#---------------------------#
Type=forking
#-----------------------------------------#
# Restart policy. Recommended: on-failure #
#-----------------------------------------#
Restart=on-failure
[Install]
WantedBy=multi-user.target
#---------------------------------------------#
# User Systemd Unit for UnrealIRCd #
# #
# NOTE: This was tested on Ubuntu 20.04+ #
#---------------------------------------------#----------------------------------------------------#
# INSTRUCTIONS #
# #
# Enable lingering for your user with the following command: #
# loginctl enable-linger #
# #
# Create the user systemd folder with the following command: #
# mkdir -p .config/systemd/user #
# #
# Put this systemd user unit inside the created folder and name it: #
# unrealircd_user.service #
# #
# Make the system aware of the service unit with the following command: #
# systemctl --user daemon-reload #
# #
#--------------------------------------------------------------------------------------------------#
# SYSTEMD COMMANDS TO MANAGE UNREALIRCD #
# #
# To start UnrealIRCd: systemctl --user start unrealircd_user.service #
# #
# To stop UnrealIRCd: systemctl --user stop unrealircd_user.service #
# #
# To reload UnrealIRCd: systemctl --user reload unrealircd_user.service #
# #
# To enable UnrealIRCd to start on boot: systemctl --user enable unrealircd_user.service #
# #
# To disable UnrealIRCd from starting on boot: systemctl --user disable unrealircd_user.service #
#--------------------------------------------------------------------------------------------------#
[Unit]
Description=UnrealIRCd IRC daemon
[Service]
#-------------------------------------------------------#
# Full path to UnrealIRCd installation directory. #
# This should be something like '/home/ircd/unrealircd' #
#-------------------------------------------------------#
WorkingDirectory=/home/ircd/unrealircd
#------------------------------------------------------------------------#
# Full command to start UnrealIRCd #
# This should be something like '/home/ircd/unrealircd/unrealircd start' #
#------------------------------------------------------------------------#
ExecStart=/home/ircd/unrealircd/unrealircd start
#-------------------------------------------------------------------------#
# Full command to rehash UnrealIRCd #
# This should be something like '/home/ircd/unrealircd/unrealircd rehash' #
#-------------------------------------------------------------------------#
ExecReload=/home/ircd/unrealircd/unrealircd rehash
#---------------------------#
# Recommended type: forking #
#---------------------------#
Type=forking
#-----------------------------------------#
# Restart policy. Recommended: on-failure #
#-----------------------------------------#
Restart=on-failure
[Install]
WantedBy=default.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment