Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Merge #691
Browse files Browse the repository at this point in the history
691: Update install locations for binary and systemd service files  r=antekresic a=antekresic

Previous package build configuration installed the systemd service
file to /etc folder which should be used for users to provide replacement
service files. Binary path was changed from /usr/local/bin to /usr/bin.

Fixes #683 

Co-authored-by: Ante Kresic <ante.kresic@gmail.com>
  • Loading branch information
bors[bot] and antekresic committed Jul 14, 2021
2 parents a903f1d + e298ffd commit 82f64c9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion build/.goreleaser.yml
Expand Up @@ -34,6 +34,8 @@ nfpms:
- rpm
- deb

bindir: /usr/bin

file_name_template: "{{ .Binary }}_{{ .RawVersion }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
replacements:
darwin: Darwin
Expand All @@ -54,7 +56,7 @@ nfpms:
maintainer: Timescale <info@timescale.com>
contents:
- src: build/systemd/promscale.service
dst: /etc/systemd/system/promscale.service
dst: /usr/lib/systemd/system/promscale.service
- src: build/conf/promscale.conf
dst: /etc/sysconfig/promscale.conf
type: "config|noreplace"
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/postinstall.sh
Expand Up @@ -8,4 +8,4 @@ echo "Modify configuration by editing $CONF_FILE config file"
echo "And then restart the service with: systemctl restart promscale"


sed -i "s|__ENV_FILE__|$CONF_FILE|g" /etc/systemd/system/promscale.service
sed -i "s|__ENV_FILE__|$CONF_FILE|g" /usr/lib/systemd/system/promscale.service
2 changes: 1 addition & 1 deletion build/systemd/promscale.service
Expand Up @@ -9,7 +9,7 @@ Type=simple
User=promscale
Group=promscale
EnvironmentFile=__ENV_FILE__
ExecStart=/usr/local/bin/promscale $OPTIONS
ExecStart=/usr/bin/promscale $OPTIONS
Restart=on-failure
RestartSec=10
KillMode=mixed
Expand Down

0 comments on commit 82f64c9

Please sign in to comment.