Created
February 22, 2013 00:45
-
-
Save larsks/5009872 to your computer and use it in GitHub Desktop.
A systemd unit for ucarp. This is a templated service; call it like `systemctl start ucarp@001` to start up ucarp using `/etc/ucarp/vip-001.conf`.
This file contains hidden or 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
[Unit] | |
Description=UCARP virtual interface %I | |
After=network.target | |
[Service] | |
Type=simple | |
EnvironmentFile=-/etc/ucarp/vip-common.conf | |
EnvironmentFile=-/etc/ucarp/vip-%I.conf | |
ExecStart=/usr/sbin/ucarp -i $BIND_INTERFACE -p $PASSWORD -v %I -a $VIP_ADDRESS -s $SOURCE_ADDRESS $OPTIONS -u $UPSCRIPT -d $DOWNSCRIPT | |
KillMode=control-group | |
[Install] | |
WantedBy=multiuser.target |
i'm curious why ucarp systemd template on centos7 (installed ucarp from epel) looks like this:
# rpm -q -a |grep ucarp
ucarp-1.5.2-11.el7.x86_64
# cat /usr/lib/systemd/system/[email protected]
[Unit]
Description=Common address redundancy protocol daemon on %I
After=syslog.target network.target
[Service]
PrivateTmp=true
Type=forking
ExecStart=/usr/libexec/ucarp/ucarp
[Install]
WantedBy=multi-user.target`
IMHO, your template looks more correct, the one from the official package looks wrong to me as every instance created just makes the unit description be different but imho cannot start another individual ucarp instance.
doesn`t it ?
regards
roland
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had to set Type=forking to keep it working
debian 8.5
ucarp 1.5.2-2