Skip to content

Commit

Permalink
install.sh: fix hardcode sysconfdir in EnvironmentFile path
Browse files Browse the repository at this point in the history
Currently we use fixed sysconfdir name 'sysconfig', it works as
expected. But let's change it to use the assigned sysconfdir, it
still works when a different sysconfdir is assigned.

 # Without this fix:
EnvironmentFile=/home/scylla-test/scylladb/etc/sysconfig//scylla-jmx

 # Applied this fix:
EnvironmentFile=/home/scylla-test/scylladb/etc/sysconfig/scylla-jmx

v2: don't translate the path in executing install.sh, it has problem
in building rpm/deb if /etc/sysconfig is a symlink. (Avi)

Signed-off-by: Amos Kong <[email protected]>
  • Loading branch information
amoskong committed Dec 29, 2020
1 parent 2c95650 commit 5de1a5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ else
cat << EOS > "$rsystemd"/scylla-jmx.service.d/nonroot.conf
[Service]
EnvironmentFile=
EnvironmentFile=$retc/sysconfig/scylla-jmx
EnvironmentFile=$(realpath -m "$rsysconfdir/scylla-jmx")
ExecStart=
ExecStart=$rprefix/jmx/scylla-jmx \$SCYLLA_JMX_PORT \$SCYLLA_API_PORT \$SCYLLA_API_ADDR \$SCYLLA_JMX_ADDR \$SCYLLA_JMX_FILE \$SCYLLA_JMX_LOCAL \$SCYLLA_JMX_REMOTE \$SCYLLA_JMX_DEBUG
User=
Expand Down

0 comments on commit 5de1a5a

Please sign in to comment.