- For use with root access, use anope_global.service.
- For use as a normal user, use anope_user.service.
Last active
February 26, 2024 00:06
-
-
Save TehPeGaSuS/7cb0c3d657c8e24eb330f18311e5a6dc to your computer and use it in GitHub Desktop.
Anope Systemd Service Units
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#----------------------------------------# | |
# Systemd Unit for Anope # | |
# # | |
# NOTE: This was tested on Ubuntu 20.04+ # | |
#----------------------------------------#---------------------------------------# | |
# INSTRUCTIONS # | |
# # | |
# Put this systemd unit inside the '/etc/systemd/system' folder and name it: # | |
# anope.service # | |
# # | |
# Make the system aware of the service unit with the following command: # | |
# systemctl daemon-reload # | |
# # | |
#--------------------------------------------------------------------------------# | |
# SYSTEMD COMMANDS TO MANAGE ANOPE # | |
# # | |
# To start Anope: systemctl start anope.service # | |
# # | |
# To stop Anope: systemctl stop anope.service # | |
# # | |
# To reload Anope: systemctl reload anope.service # | |
# # | |
# To enable Anope to start on boot: systemctl enable anope.service # | |
# # | |
# To disable Anope from starting on boot: systemctl disable anope.service # | |
# # | |
# To watch Anope systemd logs in real time: journalctl -f --unit anope.service # | |
#--------------------------------------------------------------------------------# | |
[Unit] | |
Description=Anope Services | |
[Service] | |
#---------------------------------------------------------------------# | |
# Full path to Anope install directory. This should be something like # | |
# /home/ircd/services for Anope 2.0 or /home/ircd/anope for Anope 2.1 # | |
#---------------------------------------------------------------------# | |
WorkingDirectory=/home/ircd/anope | |
#-----------------------------------------------------------# | |
# Full path to anope binary. This should be something like # | |
# /home/ircd/services/bin/services for Anope 2.0 or then # | |
# /home/ircd/anope/bin/anope for Anope 2.1 # | |
# The use of the '--nofork' argument is recommended # | |
#-----------------------------------------------------------# | |
ExecStart=/home/ircd/anope/bin/anope --nofork | |
#-----------------------------------------# | |
# Command to rehash Anope # | |
#-----------------------------------------# | |
ExecReload=/usr/bin/kill -1 $MAINPID | |
#------------------------------------------------------------------# | |
# User and group where Anope is currenly installed # | |
# When installed from source, usually, user and group are the same # | |
#------------------------------------------------------------------# | |
User=ircd | |
# | |
Group=ircd | |
#-----------------------------------------# | |
# Restart policy. Recommended: on-failure # | |
#-----------------------------------------# | |
Restart=on-failure | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#----------------------------------------# | |
# User Systemd Unit for Anope # | |
# # | |
# 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: # | |
# anope.service # | |
# # | |
# Make the system aware of the service unit with the following command: # | |
# systemctl --user daemon-reload # | |
# # | |
#-----------------------------------------------------------------------------------# | |
# SYSTEMD COMMANDS TO MANAGE ANOPE # | |
# # | |
# To start Anope: systemctl --user start anope.service # | |
# # | |
# To stop Anope: systemctl --user stop anope.service # | |
# # | |
# To reload Anope: systemctl --user reload anope.service # | |
# # | |
# To enable Anope to start on boot: systemctl --user enable anope.service # | |
# # | |
# To disable Anope from starting on boot: systemctl --user disable anope.service # | |
# # | |
# To watch Anope systemd logs in real time: journalctl -f --user-unit anope.service # | |
#-----------------------------------------------------------------------------------# | |
[Unit] | |
Description=Anope Services | |
After=default.target | |
[Service] | |
#-------------------------------------------------------------------------# | |
# Full path to Anope install directory. This should be something like # | |
# '/home/ircd/services' for Anope 2.0 or '/home/ircd/anope' for Anope 2.1 # | |
#-------------------------------------------------------------------------# | |
WorkingDirectory=/home/ircd/anope | |
#-------------------------------------------------------------# | |
# Full path to anope binary. This should be something like # | |
# '/home/ircd/services/bin/services' for Anope 2.0 or then # | |
# '/home/ircd/anope/bin/anope' for Anope 2.1 # | |
# The use of the '--nofork' argument is recommended # | |
#-------------------------------------------------------------# | |
ExecStart=/home/ircd/anope/bin/anope --nofork | |
#-----------------------------------------# | |
# Command to rehash Anope # | |
#-----------------------------------------# | |
ExecReload=/usr/bin/kill -1 $MAINPID | |
#-----------------------------------------# | |
# 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