From 9d3c8b1867bbf35e7aaae2f58cbec6cff3c6b4f1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Fri, 19 Jan 2007 10:13:48 +0000 Subject: [PATCH] - new Changed files: conman.logrotate -> 1.1 conmand.init -> 1.1 conmand.sysconfig -> 1.1 --- conman.logrotate | 8 +++++ conmand.init | 76 +++++++++++++++++++++++++++++++++++++++++++++++ conmand.sysconfig | 4 +++ 3 files changed, 88 insertions(+) create mode 100644 conman.logrotate create mode 100644 conmand.init create mode 100644 conmand.sysconfig diff --git a/conman.logrotate b/conman.logrotate new file mode 100644 index 0000000..ef01826 --- /dev/null +++ b/conman.logrotate @@ -0,0 +1,8 @@ +/var/log/conman/* { + olddir /var/log/archiv + create 640 root root + sharedscripts + postrotate + /bin/killall -HUP conmand + endscript +} diff --git a/conmand.init b/conmand.init new file mode 100644 index 0000000..3f2a98c --- /dev/null +++ b/conmand.init @@ -0,0 +1,76 @@ +#!/bin/sh +# +# conman conman (serial console server) +# +# chkconfig: 345 60 40 +# +# description: conman is a serial console server + + +# Source function library +. /etc/rc.d/init.d/functions + +# Get network config +. /etc/sysconfig/network + +# Get service config +[ -f /etc/sysconfig/conmand ] && . /etc/sysconfig/conmand + +# Check that networking is up. +if is_yes "${NETWORKING}"; then + if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status -a "$1" != init ]; then + msg_network_down conman + exit 1 + fi +else + exit 0 +fi + +RETVAL=0 +# See how we were called. +case "$1" in + start) + # Check if the service is already running? + if [ ! -f /var/lock/subsys/conmand ]; then + msg_starting conmand + daemon /usr/sbin/conmand + RETVAL=$? + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/conmand + else + msg_already_running conmand + fi + ;; + stop) + if [ -f /var/lock/subsys/conmand ]; then + msg_stopping conmand + killproc conmand + rm -f /var/lock/subsys/conmand >/dev/null 2>&1 + else + msg_not_running conmand + fi + ;; + restart) + $0 stop + $0 start + exit $? + ;; + status) + status conmand + exit $? + ;; + reload|force-reload) + if [ -f /var/lock/subsys/conmand ]; then + msg_reloading conmand + killproc conman -HUP + RETVAL=$? + else + msg_not_running conmand + exit 7 + fi + ;; + *) + msg_usage "$0 {start|stop|init|restart|reload|force-reload|status}" + exit 3 +esac + +exit $RETVAL diff --git a/conmand.sysconfig b/conmand.sysconfig new file mode 100644 index 0000000..22f44f1 --- /dev/null +++ b/conmand.sysconfig @@ -0,0 +1,4 @@ +# Customized setings for conmand + +# Define nice level for conmand +SERVICE_RUN_NICE_LEVEL="+5" -- 2.43.0