The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]



Индекс форумов
Составление сообщения

Исходное сообщение
"Автозагрузк Perl скритпа  в SUSE 10.2"
Отправлено Gennadi, 06-Июн-08 00:21 
>[оверквотинг удален]
>>
>>Как быть помоги плизззз.....
>>
>>Заранее спасибо;)
>
>SMPPPD_BIN= /work/sms/sms.sh
>
>а так:
>
>ps ax | grep sms.sh

Попробуй этот скрипт:

=============================================================
#! /bin/sh

## BEGIN INIT INFO
# Provides:       sms
# Required-Start: $remote_fs $network $syslog
# Should-Start:   isdn $named slpd
# Required-Stop:  $remote_fs $network $syslog
# Should-Stop:    isdn $named slpd
# Default-Start:  2 3 5
# Default-Stop:   0 1 6
# Description:    Start the sms.
### END INIT INFO

# Set some defaults
SMPPPD="sms.sh"
SMPPPD_BIN_DIR=/work/sms
SMPPPD_PID_FILE=/var/run/sms.pid
SMPPPD_PID=/var/run/sms.pid
SMPPPD_BIN=$SMPPPD_BIN_DIR/$SMPPPD
#PID=`ps -aef | grep "$SMPPPD" | grep -v grep | awk '{print $2}'`
# Source LSB init functions
# providing start_daemon, killproc, pidofproc,
# log_success_msg, log_failure_msg and log_warning_msg.
# This is currently not used by UnitedLinux based distributions and
# not needed for init scripts for UnitedLinux only. If it is used,
# the functions from rc.status should not be sourced or used.
#. /lib/lsb/init-functions


test -x $SMPPPD_BIN || { echo "$SMPPPD_BIN not installed";
    if [ "$1" = "stop" ]; then exit 0;
    else exit 5; fi; }

# Shell functions sourced from /etc/rc.status:
#      rc_check         check and set local and overall rc status
#      rc_status        check and set local and overall rc status
#      rc_status -v     be verbose in local rc status and clear it afterwards
#      rc_status -v -r  ditto and clear both the local and overall rc status
#      rc_status -s     display "skipped" and exit with status 3
#      rc_status -u     display "unused" and exit with status 3
#      rc_failed        set local and overall rc status to failed
#      rc_failed <num>  set local and overall rc status to <num>
#      rc_reset         clear both the local and overall rc status
#      rc_exit          exit appropriate to overall rc status
#      rc_active        checks whether a service is activated by symlinks
#      rc_splash arg    sets the boot splash screen to arg (if active)
. /etc/rc.status

# Reset status of this service
rc_reset

# Return values acc. to LSB for all commands but status:
# 0      - success
# 1       - generic or unspecified error
# 2       - invalid or excess argument(s)
# 3       - unimplemented feature (e.g. "reload")
# 4       - user had insufficient privileges
# 5       - program is not installed
# 6       - program is not configured
# 7       - program is not running
# 8--199  - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signaling is not supported) are
# considered a success.

case "$1" in
    start)
    echo -n "Starting SMPPPD"
    startproc $SMPPPD_BIN
    rc_status -v
    ;;
    stop)
    echo -n "Shutting down SMPPPD"
    killproc $SMPPPD_BIN
    rc_status -v
    ;;
    try-restart)
    $0 status >/dev/null &&  $0 restart
    rc_status
    ;;
    restart)
    $0 stop
    $0 start
    rc_status
    ;;
    status)
    echo -n "Checking for SMPPPD: "
    ## Check status with checkproc(8), if process is running
    ## checkproc will return with exit status 0.

    # Status has a slightly different for the status command:
    # 0 - service running
    # 1 - service dead, but /var/run/  pid  file exists
    # 2 - service dead, but /var/lock/ lock file exists
    # 3 - service not running

    # NOTE: checkproc returns LSB compliant status values.
    checkproc $SMPPPD_BIN
    rc_status -v
    ;;
   force-reload)
    ## Signal the daemon to reload its config. Most daemons
    ## do this on signal 1 (SIGHUP).
    ## If it does not support it, restart.
    echo -n "Reload service SMPPPD"
    echo ""
    $0 stop  &&  $0 start
    rc_status
    ;;
    probe)
    test $SMPPPD_PID_FILE && \
         echo restart
    ;;
    *)
    echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
    ;;
esac
rc_exit
====================================================================================

 

Ваше сообщение
Имя*:
EMail:
Для отправки новых сообщений в текущей нити на email укажите знак ! перед адресом, например, !user@host.ru (!! - не показывать email).
Более тонкая настройка отправки ответов производится в профиле зарегистрированного участника форума.
Заголовок*:
Сообщение*:
  Введите код, изображенный на картинке: КОД
 
При общении не допускается: неуважительное отношение к собеседнику, хамство, унизительное обращение, ненормативная лексика, переход на личности, агрессивное поведение, обесценивание собеседника, провоцирование флейма голословными и заведомо ложными заявлениями. Не отвечайте на сообщения, явно нарушающие правила - удаляются не только сами нарушения, но и все ответы на них. Лог модерирования.



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру