diff --git a/cta.spec.in b/cta.spec.in index b9c91e7b014c1139a7741f619a87ad28cf656722..f14c28d7ba62d079f8ea1105055a66a897763ca2 100644 --- a/cta.spec.in +++ b/cta.spec.in @@ -176,19 +176,32 @@ The xroot plugin %systemd_post cta-frontend.service %systemdDaemonReload -%package -n cta-frontend-grpc -Summary: CERN Tape Archive: gRPC based frontend +%package -n cta-dcache +Summary: CERN Tape Archive: dCache compatibility frontend Group: Application/CTA Requires: logrotate Requires: cta-common = %{version}-%{release} Requires: cta-lib = %{version}-%{release} Requires: cta-lib-catalogue = %{version}-%{release} -%description -n cta-frontend-grpc +%description -n cta-dcache CERN Tape Archive: -gRPC based frontend -%files -n cta-frontend-grpc +dCache frontend +%files -n cta-dcache %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 Summary: CERN Tape Archive: command line interface diff --git a/frontend_svc/gRPC/CMakeLists.txt b/frontend_svc/gRPC/CMakeLists.txt index 2949e8ae88be96bb0a0d5a977fa968602ec212d1..8025c8ce42d39d41658ca9911787302185077d37 100644 --- a/frontend_svc/gRPC/CMakeLists.txt +++ b/frontend_svc/gRPC/CMakeLists.txt @@ -20,11 +20,12 @@ find_package(Protobuf3 REQUIRED) include_directories(${CMAKE_BINARY_DIR}/eos_cta ${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} 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) \ No newline at end of file +install(TARGETS cta-dcache DESTINATION usr/bin) +install (FILES cta-dcache.service DESTINATION etc/systemd/system) \ No newline at end of file diff --git a/frontend_svc/gRPC/cta-dcache.service b/frontend_svc/gRPC/cta-dcache.service new file mode 100644 index 0000000000000000000000000000000000000000..89dd9e99038977ac99cb7f27dc2139c36afc0dae --- /dev/null +++ b/frontend_svc/gRPC/cta-dcache.service @@ -0,0 +1,13 @@ +[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