enma/スクリプト
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
**スクリプト [#ua5a6989]
#contents
----
***起動スクリプト [#x10087b1]
#!/bin/bash
#
# Copyright (c) 2008-2009 Internet Initiative Japan Inc....
#
# The terms and conditions of the accompanying program
# shall be provided separately by Internet Initiative Ja...
# Any use, reproduction or distribution of the program a...
# provided that you agree to be bound to such terms and ...
#
# $Id: rc.enma-centos 882 2009-04-02 01:02:28Z takahiko $
#
# chkconfig: 345 79 31
# description: A milter program for domain authenticatio...
# source function library
. /etc/init.d/functions
RETVAL=0
prog=enma
ENMA=/usr/local/libexec/enma
CONF_FILE=/usr/local/etc/enma.conf
LOCK_FILE=/var/lock/subsys/enma
function start()
{
echo -n $"Starting ${prog}: "
#ulimit -n 65000 # The maximum number of open f...
#ulimit -s 512 # The maximum stack size
${ENMA} -c ${CONF_FILE} && success || failure
RETVAL=$?
[ ${RETVAL} -eq 0 ] && touch ${LOCK_FILE}
echo
}
function stop()
{
echo -n $"Stopping ${prog}: "
killproc ${ENMA} -TERM
RETVAL=$?
[ ${RETVAL} -eq 0 ] && rm -f ${LOCK_FILE}
echo
}
function restart()
{
stop && sleep 5 && start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
condrestart)
[ -f ${LOCK_FILE} ] && restart
;;
status)
status ${ENMA}
RETVAL=$?
;;
*)
echo "Usage: ${prog} {start|stop|restart|reload|...
RETVAL=1
;;
esac
exit ${RETVAL}
終了行:
**スクリプト [#ua5a6989]
#contents
----
***起動スクリプト [#x10087b1]
#!/bin/bash
#
# Copyright (c) 2008-2009 Internet Initiative Japan Inc....
#
# The terms and conditions of the accompanying program
# shall be provided separately by Internet Initiative Ja...
# Any use, reproduction or distribution of the program a...
# provided that you agree to be bound to such terms and ...
#
# $Id: rc.enma-centos 882 2009-04-02 01:02:28Z takahiko $
#
# chkconfig: 345 79 31
# description: A milter program for domain authenticatio...
# source function library
. /etc/init.d/functions
RETVAL=0
prog=enma
ENMA=/usr/local/libexec/enma
CONF_FILE=/usr/local/etc/enma.conf
LOCK_FILE=/var/lock/subsys/enma
function start()
{
echo -n $"Starting ${prog}: "
#ulimit -n 65000 # The maximum number of open f...
#ulimit -s 512 # The maximum stack size
${ENMA} -c ${CONF_FILE} && success || failure
RETVAL=$?
[ ${RETVAL} -eq 0 ] && touch ${LOCK_FILE}
echo
}
function stop()
{
echo -n $"Stopping ${prog}: "
killproc ${ENMA} -TERM
RETVAL=$?
[ ${RETVAL} -eq 0 ] && rm -f ${LOCK_FILE}
echo
}
function restart()
{
stop && sleep 5 && start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
condrestart)
[ -f ${LOCK_FILE} ] && restart
;;
status)
status ${ENMA}
RETVAL=$?
;;
*)
echo "Usage: ${prog} {start|stop|restart|reload|...
RETVAL=1
;;
esac
exit ${RETVAL}
ページ名: