dist: move service command line to scripts/jmx_run
Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com> Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
This commit is contained in:
parent
452b0e9856
commit
3259ef9604
5
dist/redhat/scripts/jmx_run
vendored
Executable file
5
dist/redhat/scripts/jmx_run
vendored
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
args="-Djava.net.preferIPv4Stack=true -Dcassandra.jmx.local.port=$JMX_LOCAL_PORT"
|
||||
|
||||
exec /usr/bin/java -jar /usr/lib/scylla/jmx/urchin-mbean-1.0.jar $args
|
5
dist/redhat/scylla-jmx.spec
vendored
5
dist/redhat/scylla-jmx.spec
vendored
@ -24,13 +24,16 @@ env JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk mvn install
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/
|
||||
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/scylla/
|
||||
|
||||
install -m644 dist/redhat/sysconfig/scylla-jmx $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/
|
||||
install -m644 dist/redhat/systemd/scylla-jmx.service $RPM_BUILD_ROOT%{_unitdir}/
|
||||
install -d -m755 $RPM_BUILD_ROOT%{_prefix}/lib/scylla
|
||||
install -d -m755 $RPM_BUILD_ROOT%{_prefix}/lib/scylla/jmx
|
||||
install -m644 target/urchin-mbean-1.0.jar $RPM_BUILD_ROOT%{_prefix}/lib/scylla/jmx/
|
||||
install -m755 dist/redhat/scripts/* $RPM_BUILD_ROOT%{_prefix}/lib/scylla/jmx
|
||||
|
||||
%pre
|
||||
/usr/sbin/groupadd scylla 2> /dev/null || :
|
||||
@ -52,7 +55,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
|
||||
%{_sysconfdir}/sysconfig/scylla-jmx
|
||||
%{_unitdir}/scylla-jmx.service
|
||||
%{_prefix}/lib/scylla/jmx/jmx_run
|
||||
%{_prefix}/lib/scylla/jmx/urchin-mbean-1.0.jar
|
||||
|
||||
%changelog
|
||||
|
1
dist/redhat/sysconfig/scylla-jmx
vendored
Normal file
1
dist/redhat/sysconfig/scylla-jmx
vendored
Normal file
@ -0,0 +1 @@
|
||||
JMX_LOCAL_PORT=7199
|
3
dist/redhat/systemd/scylla-jmx.service
vendored
3
dist/redhat/systemd/scylla-jmx.service
vendored
@ -5,9 +5,10 @@ After=scylla-server.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
EnvironmentFile=/etc/sysconfig/scylla-jmx
|
||||
User=scylla
|
||||
Group=scylla
|
||||
ExecStart=/usr/bin/java -jar /usr/lib/scylla/jmx/urchin-mbean-1.0.jar
|
||||
ExecStart=/usr/lib/scylla/jmx/jmx_run
|
||||
KillMode=process
|
||||
Restart=always
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user