Skip to content
Snippets Groups Projects
Commit 9277f1ec authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan :coffee:
Browse files

cta-dcache: rename frontend-grpc into cta-dcache + systemd

parent f6911963
No related branches found
No related tags found
No related merge requests found
...@@ -176,19 +176,32 @@ The xroot plugin ...@@ -176,19 +176,32 @@ The xroot plugin
%systemd_post cta-frontend.service %systemd_post cta-frontend.service
%systemdDaemonReload %systemdDaemonReload
%package -n cta-frontend-grpc %package -n cta-dcache
Summary: CERN Tape Archive: gRPC based frontend Summary: CERN Tape Archive: dCache compatibility frontend
Group: Application/CTA Group: Application/CTA
Requires: logrotate Requires: logrotate
Requires: cta-common = %{version}-%{release} Requires: cta-common = %{version}-%{release}
Requires: cta-lib = %{version}-%{release} Requires: cta-lib = %{version}-%{release}
Requires: cta-lib-catalogue = %{version}-%{release} Requires: cta-lib-catalogue = %{version}-%{release}
%description -n cta-frontend-grpc %description -n cta-dcache
CERN Tape Archive: CERN Tape Archive:
gRPC based frontend dCache frontend
%files -n cta-frontend-grpc %files -n cta-dcache
%defattr(0755,root,root) %defattr(0755,root,root)
%attr(0755,root,root) %{_bindir}/frontend-grpc-svc %attr(0755,root,root) %{_bindir}/cta-dcache
%attr(0644,root,root) /etc/systemd/system/cta-dcache.service
%post -n cta-dcache
%systemd_post cta-dcache.service
%systemdDaemonReload
%systemdTryRestart cta-dcache.service
%preun -n cta-dcache
%systemd_preun cta-dcache.service
%postun -n cta-dcache
%systemd_postun cta-dcache.service
%systemdDaemonReload
%package -n cta-cli %package -n cta-cli
Summary: CERN Tape Archive: command line interface Summary: CERN Tape Archive: command line interface
......
...@@ -20,11 +20,12 @@ find_package(Protobuf3 REQUIRED) ...@@ -20,11 +20,12 @@ find_package(Protobuf3 REQUIRED)
include_directories(${CMAKE_BINARY_DIR}/eos_cta include_directories(${CMAKE_BINARY_DIR}/eos_cta
${PROTOBUF3_INCLUDE_DIRS}) ${PROTOBUF3_INCLUDE_DIRS})
add_executable(frontend-grpc-svc FrontendGRpcSvc.cpp) add_executable(cta-dcache FrontendGRpcSvc.cpp)
target_link_libraries(frontend-grpc-svc CtaGRpc target_link_libraries(cta-dcache CtaGRpc
${PROTOBUF3_LIBRARIES} ${GRPC_GRPC++_LIBRARY} ${PROTOBUF3_LIBRARIES} ${GRPC_GRPC++_LIBRARY}
ctascheduler ctacommon ctaobjectstore ctacatalogue) ctascheduler ctacommon ctaobjectstore ctacatalogue)
set_property(TARGET frontend-grpc-svc APPEND PROPERTY INSTALL_RPATH ${PROTOBUF3_RPATH}) set_property(TARGET cta-dcache APPEND PROPERTY INSTALL_RPATH ${PROTOBUF3_RPATH})
install(TARGETS frontend-grpc-svc DESTINATION usr/bin) install(TARGETS cta-dcache DESTINATION usr/bin)
\ No newline at end of file install (FILES cta-dcache.service DESTINATION etc/systemd/system)
\ No newline at end of file
[Unit]
Description=dCache frontend for CERN Tape Archive (CTA)
After=syslog.target network-online.target
[Service]
ExecStart=/usr/bin/cta-dcache
Type=simple
Restart=always
User=cta
Group=cta
[Install]
WantedBy=default.target
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment