diff --git a/systemctl-files/README b/systemctl-files/README new file mode 100644 index 0000000000..69c53e36e5 --- /dev/null +++ b/systemctl-files/README @@ -0,0 +1,6 @@ +This directory holds files that will enable the BES to be controlled +using the systemd/systemctl utilities found on a modern Unix system. +These can be used in place of the chkconfig script and the current +besd script built using besd.in with configure. + +Contributed by "White, Marcus O. (GSFC-619.0)[ADNET SYSTEMS INC]" diff --git a/systemctl-files/besd b/systemctl-files/besd new file mode 100755 index 0000000000..92cce1ab99 --- /dev/null +++ b/systemctl-files/besd @@ -0,0 +1,14 @@ +# Service-specific configuration file for besd. This will be sourced by +# systemd for the default service (besd.service) + +# Please take a look at /etc/besd/besd.conf to have an idea what you +# can override. +# -i back-end server installation directory +# -c use back-end server configuration file CONFIG +# -d send debugging for CONTEXT to cerr or +# -p set port to PORT +# -r bes.pid file stored in directory PID_DIR +# -s specifies a secure server using SLL authentication +# -u set unix socket to UNIX_SOCKET + +BESD_OPTIONS = "-i /usr -c /etc/bes/bes.conf -r /run" diff --git a/systemctl-files/besd.service b/systemctl-files/besd.service new file mode 100644 index 0000000000..f9b21b93fc --- /dev/null +++ b/systemctl-files/besd.service @@ -0,0 +1,23 @@ +[Unit] +Description=Hyrax Back-End Service +After=network.target httpd.service + +[Service] +Type=simple +EnvironmentFile=-/etc/sysconfig/besd +ExecStart=/usr/bin/besdaemon $BESD_OPTIONS +ExecReload=/usr/bin/kill -HUP $MAINPID +Restart=on-failure +RestartSec=30s +PIDFile=/run/bes.pid +#KillMode=control-group +#TimeoutStopSec=30s +# Uncomment to immediately kill all processes, including the subprocesses +KillMode=mixed + +# Increase the default a bit in order to allow many simultaneous +# files to be monitored, we might need a lot of fds. +LimitNOFILE=16384 + +[Install] +WantedBy=multi-user.target