Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added systemd service files #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions files/glbd.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
# On Debian and derivatives it should be placed in /etc/default/glbd
#
# On Archlinux it should be placed in /etc/conf.d/glbd
#
# All settings besides LISTEN_ADDR are optional.
#

Expand Down
18 changes: 18 additions & 0 deletions files/glbd.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[Unit]
Description=Galera Load Balancer Service
After=network.target

[Service]
#adjust the EnvironmentFile variable for your distribution
# On Red Hat and derivatives it should be /etc/sysconfig/glbd
#
# On Debian and derivatives it should be /etc/default/glbd
#
# On ArchLinux it should be /etc/conf.d/glbd
#
EnvironmentFile=/etc/conf.d/glbd
Type=simple
ExecStart=/usr/sbin/glbd $CONTROL_FIFO $CONTROL_ADDR $OTHER_OPTIONS $MAX_CONN $THREADS $LISTEN_ADDR $DEFAULT_TARGETS

[Install]
WantedBy=multi-user.target
23 changes: 23 additions & 0 deletions files/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This systemd file is for the case when you want to run different glbd instances on one machine.
# copy the default config file to /etc/syconfig/glbd@yourname (distribution specific, see below)
# and enable or start the service with "systemctl enable glbd@yourname"
#

[Unit]
Description=Galera Load Balancer Service %i
After=network.target

[Service]
#adjust the EnvironmentFile variable for your distribution
# On Red Hat and derivatives it should be /etc/sysconfig/glbd@%i
#
# On Debian and derivatives it should be /etc/default/glbd@%i
#
# On ArchLinux it should be /etc/conf.d/glbd@%i
#
EnvironmentFile=/etc/conf.d/glbd@%i
Type=simple
ExecStart=/usr/sbin/glbd $CONTROL_FIFO $CONTROL_ADDR $OTHER_OPTIONS $MAX_CONN $THREADS $LISTEN_ADDR $DEFAULT_TARGETS

[Install]
WantedBy=multi-user.target