Skip to content
This repository was archived by the owner on Aug 30, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions packaging/RPMS/Fedora/rabbitmq-server.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@ After=syslog.target network.target
Type=notify
User=rabbitmq
Group=rabbitmq
NotifyAccess=all
TimeoutStartSec=3600
# Note:
# You *may* wish to add the following to automatically restart RabbitMQ
# in the event of a failure. systemd service restarts are not a
# replacement for service monitoring. Please see
# http://www.rabbitmq.com/monitoring.html
#
# Restart=on-failure # https://www.freedesktop.org/software/systemd/man/systemd.service.html#Restart=
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use Restart=on-failure and the next line by default?

# RestartSec=10 # https://www.freedesktop.org/software/systemd/man/systemd.service.html#RestartSec=
WorkingDirectory=/var/lib/rabbitmq
ExecStart=/usr/sbin/rabbitmq-server
ExecStop=/usr/sbin/rabbitmqctl stop
ExecStop=/bin/sh -c "while ps -p $MAINPID >/dev/null 2>&1; do sleep 1; done"
NotifyAccess=all
TimeoutStartSec=3600

[Install]
WantedBy=multi-user.target
8 changes: 8 additions & 0 deletions packaging/debs/Debian/debian/rabbitmq-server.service
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ User=rabbitmq
Group=rabbitmq
NotifyAccess=all
TimeoutStartSec=3600
# Note:
# You *may* wish to add the following to automatically restart RabbitMQ
# in the event of a failure. systemd service restarts are not a
# replacement for service monitoring. Please see
# http://www.rabbitmq.com/monitoring.html
#
# Restart=on-failure # https://www.freedesktop.org/software/systemd/man/systemd.service.html#Restart=
# RestartSec=10 # https://www.freedesktop.org/software/systemd/man/systemd.service.html#RestartSec=
WorkingDirectory=/var/lib/rabbitmq
ExecStart=/usr/lib/rabbitmq/bin/rabbitmq-server
ExecStop=/usr/lib/rabbitmq/bin/rabbitmqctl stop
Expand Down