Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37891544
en ru br
Репозитории ALT
S:1.0.2-alt1
5.1: 1.0.2-alt1
4.1: 1.0.2-alt1
www.altlinux.org/Changes

Группа :: Система/Серверы
Пакет: jabber-alice

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

#!/bin/sh
#
# alice An XMPP (Jabber) component for making aliases for an existing XMPP acconts
#
# chkconfig: 345 71 29
# description: Alice is a small script for creating aliases for an existing Jabber accounts
#
# processname: perl
# config: @configfile@
# pidfile: @pidfile@
#
### BEGIN INIT INFO
# Provides: jabber-alice
# Required-Start: $network
# Required-Stop: $network
# Should-Start: $jabber
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: start and stop Alice XMPP component
# Description: Alice is a small script for creating aliases for an existing Jabber accounts
### END INIT INFO


# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

[ -r @sysconfigfile@ ] && . @sysconfigfile@

LOCKFILE=@lockfile@
PIDFILE=@pidfile@
BASEDIR=@basedir@
EXECFILE=$BASEDIR/@scriptname@

# Check that networking is up.
[ $NETWORKING = "no" ] && exit 0

RETVAL=0

start()
{
if [ ! -r "$CONFIG_FILE" ]; then
echo "alice is not configured - no config file $CONFIG_FILE found"
# LSB 3.1.0: 6 - program is not configured
RETVAL=6
fi
start_daemon \
--pidfile "$PIDFILE" \
--lockfile "$LOCKFILE" \
--user "$USERNAME" \
--name perl \
--displayname jabber-alice \
-- "$EXECFILE" --config="$CONFIG_FILE"
RETVAL=$?
}

stop()
{
stop_daemon \
--pidfile "$PIDFILE" \
--lockfile "$LOCKFILE" \
--expect-user "$USERNAME" \
--displayname jabber-alice \
-- perl
RETVAL=$?
}

stat()
{
status \
--pidfile "$PIDFILE" \
--lockfile "$LOCKFILE" \
--expect-user "$USERNAME" \
--displayname jabber-alice \
-- perl
RETVAL=$?
}

# See how we were called.
case "$1" in
start)
start
;;
stop|condstop)
stop
;;
restart|force-reload)
stop
start
;;
try-restart|condrestart|condreload)
stat 2&>/dev/null
[ "$RETVAL" == "0" ] && (stop; start);
;;
status)
stat
;;
*)
msg_usage "${0##*/} {start|stop|restart|status|try-restart|force-reload|condstop|condrestart|condreload|help}"
RETVAL=1

esac

exit $RETVAL
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin