Commit 483316c8 authored by Anastasia Karachaliou's avatar Anastasia Karachaliou
Browse files

cta-acsd running through systemctl

parent 22282b4e
......@@ -309,13 +309,24 @@ Tools to faciliate working with acsd in cta
%files -n cta-acsd
%defattr(-,root,root)
%attr(0755,cta,cta) %dir /var/log/cta
#%attr(0644,root,root) %config(noreplace) /etc/logrotate.d/cta-rmcd
%attr(0644,root,root) %config(noreplace) /etc/logrotate.d/cta-acsd
#%attr(0644,root,root) %doc /usr/share/man/man1/cta-acsd.1cta.gz
%attr(0755,root,root) %{_bindir}/cta-acsd
#%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cta/cta-rmcd.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cta/cta-acsd.conf
%attr(0644,root,root) %config(noreplace) /etc/sysconfig/cta-acsd
%attr(0644,root,root) /etc/systemd/system/cta-acsd.service
%post -n cta-acsd
%systemd_post cta-acsd.service
%systemdDaemonReload
%preun -n cta-acsd
%systemd_preun cta-acsd.service
%postun -n cta-acsd
%systemd_postun cta-acsd.service
%systemdDaemonReload
%package -n cta-rmcd
Summary: Tools to faciliate working with rmcd and smc in cta
Group: Application/CTA
......
......@@ -131,8 +131,8 @@ void AcsDaemon::exceptionThrowingMain(
logStartOfDaemon(argc, argv);
AcsdCmdLine Commandline(argc,argv); //parse command line
setCommandLineHasBeenParsed(Commandline.foreground);
const std::string runAsStagerSuperuser = m_config.daemonUserName.value();;
const std::string runAsStagerSupergroup = m_config.daemonGroupName.value();;
const std::string runAsStagerSuperuser = m_config.daemonUserName.value();
const std::string runAsStagerSupergroup = m_config.daemonGroupName.value();
daemonizeIfNotRunInForegroundAndSetUserAndGroup(runAsStagerSuperuser, runAsStagerSupergroup);
setDumpable();
......
......@@ -81,7 +81,7 @@ static int exceptionThrowingMain(cta::log::Logger &log, const int argc, char **c
cta::mediachanger::reactor::ZMQReactor reactor(log);
const cta::mediachanger::acs::daemon::AcsdConfiguration config = cta::mediachanger::acs::daemon::AcsdConfiguration::createFromCtaConf("/etc/cta/acsd.conf",log);
const cta::mediachanger::acs::daemon::AcsdConfiguration config = cta::mediachanger::acs::daemon::AcsdConfiguration::createFromCtaConf("/etc/cta/cta-acsd.conf",log);
// Create the main acsd object
......
......@@ -4,10 +4,7 @@ find_package(Protobuf3 REQUIRED)
find_package(openssl REQUIRED)
find_package(zeromq REQUIRED)
#file(GLOB ProtoFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.proto")
#PROTOBUF3_GENERATE_CPP(ProtoSources ProtoHeaders ${ProtoFiles})
include_directories (${PROTOBUF3_INCLUDE_DIRS})
#add_library(ctamediachangeracsdaemonprotobuf ${ProtoSources})
PROTOBUF3_GENERATE_CPP(WDMsgSources WDMsgHeaders WatchdogMessage.proto)
......@@ -41,12 +38,13 @@ target_link_libraries(
ctareactor
CtaAcsDaemon
ctamediachanger
# ctamediachangeracsdaemonprotobuf
zmq
${STK_LIBRARIES})
set_property (TARGET cta-acsd APPEND PROPERTY INSTALL_RPATH ${PROTOBUF3_RPATH})
install (FILES cta-acsd.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/cta)
install (TARGETS cta-acsd DESTINATION /usr/bin)
install (FILES cta-acsd.1cta DESTINATION /usr/share/man/man1)
install (FILES cta-acsd.logrotate DESTINATION /etc/logrotate.d RENAME cta-acsd)
install (FILES cta-acsd.sysconfig DESTINATION /etc/sysconfig RENAME cta-acsd)
install (FILES cta-acsd.service DESTINATION /etc/systemd/system)
......@@ -60,3 +58,5 @@ target_link_libraries (ctamediachangeracsdaemonunittests
install (TARGETS ctamediachangeracsdaemonunittests DESTINATION usr/${CMAKE_INSTALL_LIBDIR})
# The CERN Tape Archive (CTA) project
# Copyright (C) 2015 CERN
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
################################################################################
#
# CTA Sample Configuration File
#
################################################################################
# The log mask. Logs with a level lower than this value will be masked.
# Possible values are:
# EMERG
# ALERT
# CRIT
# ERR
# WARNING
# NOTICE
# INFO
# DEBUG
# USERERR
#
# Please note that the USERERR log level is equivalent to NOTICE because it is
# a convention of CTA to use log level NOTICE to label user errors.
#
# taped LogMask INFO
/var/log/cta/cta-acsd*.log {
compress
daily
missingok
rotate 500
delaycompress
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
# Arguments for the rmcd server daemon
# -smc_ldr is the picker device as defined in /dev.
# -f keep process in the foreground, do not fork.
#CTA_ACSD_OPTIONS="/dev/sg9"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment