From 5de1a5a274c5e9a5fa1fda099d0b225994c25d34 Mon Sep 17 00:00:00 2001 From: Amos Kong Date: Mon, 28 Dec 2020 19:10:28 +0800 Subject: [PATCH] install.sh: fix hardcode sysconfdir in EnvironmentFile path 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 --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index bae587c..16289fe 100755 --- a/install.sh +++ b/install.sh @@ -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=