Skip to content

Commit

Permalink
Merge pull request #11 from cultcom/fix-config-path
Browse files Browse the repository at this point in the history
Streamline config file location (as used in the Service File).
  • Loading branch information
markwort authored Sep 16, 2019
2 parents 90a9530 + be33316 commit 31b91a4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ Manages a virtual IP based on state kept in etcd or Consul. Monitors state in et
## Installing on debian

* Install the debian package. Currently you will have to build the package yourself. Prebuilt packages are coming soon.
* Edit `/etc/patroni/vip.conf`. See the configuration section for details.
* Edit `/etc/default/vip-manager`. See the configuration section for details.
* Start and enable vip-manager service with systemctl.

## Installing by hand

* Build the vip-manager binary using go.
* Install service file from `package/scripts/vip-manager.service` to `/etc/systemd/system/`
* Install configuration file from `package/config/vip-manager.default` to `/etc/patroni/vip.conf`
* Install configuration file from `package/config/vip-manager.default` to `/etc/default/vip-manager`
* Edit config and start the service.

## Configuration
Expand Down
3 changes: 0 additions & 3 deletions package/scripts/vip-manager
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ if [ ! -d "$piddir" ]; then
chown $USER:$GROUP $piddir
fi

# Configuration file
config=/etc/vip-manager/vip.conf

# If the daemon is not there, then exit.
[ -x $daemon ] || exit 5

Expand Down
2 changes: 1 addition & 1 deletion package/scripts/vip-manager.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Before=patroni.service
[Service]
Type=simple

EnvironmentFile=-/etc/patroni/vip.conf
EnvironmentFile=-/etc/default/vip-manager

ExecStart=/bin/bash -c "/usr/bin/vip-manager -ip=\"${VIP_IP}\" -iface=\"${VIP_IFACE}\" -key=\"${VIP_KEY}\" -host=\"${VIP_HOST}\" -type=\"${VIP_TYPE}\" -endpoint=\"${VIP_ENDPOINT}\" -mask=\"${VIP_MASK}\""
Restart=on-failure
Expand Down

0 comments on commit 31b91a4

Please sign in to comment.