diff --git a/tapeserver/cta-taped.init b/tapeserver/cta-taped.init deleted file mode 100755 index 08beec8f45366546e7a1549271b1ec66d33a19c6..0000000000000000000000000000000000000000 --- a/tapeserver/cta-taped.init +++ /dev/null @@ -1,103 +0,0 @@ -#! /bin/sh -# -# -# 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/>. - - -# Source function library. -. /etc/rc.d/init.d/functions - -# Variables -prog="cta-taped" -export DAEMON_COREFILE_LIMIT="unlimited" -RETVAL=0 - -# Source sysconfig files -if [ -f /etc/sysconfig/cta-taped ]; then - . /etc/sysconfig/cta-taped -fi -if [ -f /etc/sysconfig/$prog ]; then - . /etc/sysconfig/$prog -fi - -start() { - # Run daemon - echo -n $"Starting $prog: " - - cd /var/log/cta - daemon /usr/bin/$prog $CTA_TAPED_OPTIONS - - # Write the pid to a file. - RETVAL=$? - if [ $RETVAL -eq 0 ]; then - pid=`ps -eo pid,ppid,comm | egrep " 1 $prog\$" | awk '{print $1}'` - rm -f /var/run/$prog.pid - if [ -n "$pid" ]; then - echo $pid > /var/run/$prog.pid - RETVAL=0 - else - RETVAL=1 - fi - fi - - [ $RETVAL -eq 0 ] && success $"$base startup" || failure $"$base startup" - echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog - return $RETVAL -} - -stop() { - echo -n $"Stopping $prog and cleaning up the drive (maximum delay of 10 minutes): " - killproc -d 600 $prog - - RETVAL=$? - echo - [ -f /var/lock/subsys/$prog ] && rm -f /var/lock/subsys/$prog - return $RETVAL -} - - -restart() { - stop - start -} - -# See how we were called -case "$1" in - - start) - start - ;; - stop) - stop - ;; - status) - status $prog - RETVAL=$? - ;; - restart) - restart - ;; - condrestart) - [ -f /var/lock/subsys/$prog ] && restart || : - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart}" - exit 1 -esac - -exit $RETVAL