±±¾©Ê¯ÓÍ»¯¹¤Ñ§Ôº2026ÄêÑо¿ÉúÕÐÉú½ÓÊÕµ÷¼Á¹«¸æ
²é¿´: 1353  |  »Ø¸´: 5

ÃÔ·µÄÓÎÏÀ

ľ³æ (ÕýʽдÊÖ)

[ÇóÖú] ÇóÖúubuntuÏÂmauiµÄ°²×°ÅäÖÃ

ÕâÊÇmaui.dµÄÒ»²¿·ÖÎļþ£º
# Source the library functions
. /etc/rc.d/init.d/redhat_functions

MAUI_PREFIX=/usr/local/maui

# let see how we were called
case "$1" in
        start)
                echo -n "Starting MAUI Scheduler: "
                daemon  $MAUI_PREFIX/sbin/maui
                echo
                ;;
        stop)
                echo -n "Shutting down MAUI Scheduler: "
                killproc maui
¡£¡£¡£¡£¡£¡£
=================================================
¶øÕâЩstart¡¢stopº¯ÊýÊǸù¾ÝredhatµÄfunctionдµÄ
Ò»ÏÂÊÇredhatµÄfunctionsÒ»²¿·Ö£º
# A function to start a program.
daemon() {
        # Test syntax.
        local gotbase= force= nicelevel corelimit
        local pid base= user= nice= bg= pid_file=
        local cgroup=
        nicelevel=0
        while [ "$1" != "${1##[-+]}" ]; do
          case $1 in
            '')    echo $"$0: Usage: daemon [+/-nicelevel] {program}"
                   return 1;;
            --check)
                   base=$2
                   gotbase="yes"
                   shift 2
                   ;;
            --check=?*)
                   base=${1#--check=}
                   gotbase="yes"
                   shift
                   ;;
            --user)
  user=$2
                   shift 2
                   ;;
            --user=?*)
                   user=${1#--user=}
                   shift
                   ;;
            --pidfile)
                   pid_file=$2
                   shift 2
                   ;;
            --pidfile=?*)
                   pid_file=${1#--pidfile=}
                   shift
                   ;;
            --force)
                   force="force"
                   shift
                   ;;
            [-+][0-9]*)
                   nice="nice -n $1"
                   shift
                   ;;
===============================================
¶øubuntuµÄfunctionÊÇÕâÑùдµÄ£º
start_daemon () {
#SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
#BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
#OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
#EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

start_daemon () {
    local force nice pidfile exec i args
    force=0
    nice=0
    pidfile=/dev/null

    OPTIND=1
    while getopts fn:p: opt ; do
        case "$opt" in
            f)  force=1;;
            n)  nice="$OPTARG";;
            p)  pidfile="$OPTARG";;
        esac
    done

    shift $(($OPTIND - 1))
    if [ "$1" = '--' ]; then
        shift
    fi

    exec="$1"; shift

    args="--start --nicelevel $nice --quiet --oknodo"
    if [ $force = 1 ]; then
        /sbin/start-stop-daemon $args --chdir "$PWD" --startas $exec --pidfile /dev/null -- "$@"
    elif [ $pidfile ]; then
        /sbin/start-stop-daemon $args --chdir "$PWD" --exec $exec --oknodo --pidfile "$pidfile" -- "$@"
    else
        /sbin/start-stop-daemon $args --chdir "$PWD" --exec $exec -- "$@"
    fi
}

pidofproc () {
    local pidfile line i pids= status specified pid
    pidfile=
    specified=

    OPTIND=1
    while getopts p: opt ; do
        case "$opt" in
            p)  pidfile="$OPTARG"; specified=1;;
        esac
    done
    shift $(($OPTIND - 1))

    base=${1##*/}
    if [ ! "$specified" ]; then
        pidfile="/var/run/$base.pid"
    fi

    if [ -n "${pidfile:-}" -a -r "$pidfile" ]; then
        read pid < "$pidfile"
        if [ -n "${pid:-}" ]; then
            if $(kill -0 "${pid:-}" 2> /dev/null); then
                echo "$pid"
                return 0
            elif ps "${pid:-}" >/dev/null 2>&1; then
                echo "$pid"
                return 0 # program is running, but not owned by this user
            else
                return 1 # program is dead and /var/run pid file exists
            fi
        fi
    fi
    if [ -x /bin/pidof -a ! "$specified" ]; then
        status="0"
        /bin/pidof -o %PPID -x $1 || status="$?"
        if [ "$status" = 1 ]; then
            return 3 # program is not running
        fi
        return 0
    fi
    return 4 # Unable to determine status
}

# start-stop-daemon uses the same algorithm as "pidofproc" above.
        /bin/pidof -o %PPID -x $1 || status="$?"
        if [ "$status" = 1 ]; then
            return 3 # program is not running
        fi
        return 0
    fi
    return 4 # Unable to determine status
}

===================================================
ÕâÑùÎÒÖ´ÐÐstartµÄʱºò¾ÍÆô¶¯²»ÁËÁË£¬Çó¸ßÊÖ¸ø³ö¸öÖ÷Òâ½â¾öһϣ¬±ð˵ÈÃÎÒ×°»Øredhat¡£¡£¡£¡£¡£¡£
»Ø¸´´ËÂ¥

» ²ÂÄãϲ»¶

» ±¾Ö÷ÌâÏà¹Ø¼ÛÖµÌùÍÆ¼ö£¬¶ÔÄúͬÑùÓаïÖú:

ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

bingmou

½ð³æ (ÖøÃûдÊÖ)

¡¾´ð°¸¡¿Ó¦Öú»ØÌû

¡ï
youzhizhe(½ð±Ò+1): лл½»Á÷¡£ 2011-09-01 11:32:36
ÃÔ·µÄÓÎÏÀ(½ð±Ò+1): 2011-09-06 20:11:18
Ê×ÏÈ£¬ÕâÊÇʲô¶«Î÷£¿
Æä´Î£¬³öÏÖÁËʲô´íÎóÌáʾ£¿
×îºó£¬ÄãÏëҪʲô£¿
2Â¥2011-09-01 11:23:23
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

ÃÔ·µÄÓÎÏÀ

ľ³æ (ÕýʽдÊÖ)

ÒýÓûØÌû:
2Â¥: Originally posted by bingmou at 2011-09-01 11:23:23:
Ê×ÏÈ£¬ÕâÊÇʲô¶«Î÷£¿
Æä´Î£¬³öÏÖÁËʲô´íÎóÌáʾ£¿
×îºó£¬ÄãÏëҪʲô£¿

ÕâÊÇlinuxϵĶÓÁйÜÀíµÄÈí¼þ£¬ÎÒÏëÓÃtorqueºÍmaui¹ÜÀíÎҵļÆËãÈÎÎñµÄ¶ÓÁа¡
¹ØÓÚ´íÎóÌáʾubuntuÏÂÊÇûÓÐrc.dÎļþ¼ÐµÄ£¬ËùÒÔÔ­À´µÄ´íÎóÊÇÕÒ²»µ½/etc/rc.d/init.d/functions,ºóÀ´ÎÒ°ÑubuntuϵÄ/lib.lsb/linit_functions ln¹ýÈ¥ºó¾ÍÊÇÌáʾdaemon not found £¬ÎÒ°ÑËü¸Ä³ÉubuntuϵÄstart_daemonºó£¬¾Íû·´Ó¦ÁË£¬µ«Ò²Æô¶¯²»ÁË¡£Ö±½Ó°ÑredhatϵͳµÄfunctions copy¹ýÀ´Ò²²»ÄÜÓã¬ÎÒÏÖÔÚµÄÎÊÌâ¾ÍÊÇ×°ÍêÕâ¸öÈí¼þºóû·¨ÓÃËü£¡
3Â¥2011-09-01 12:04:16
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

bingmou

½ð³æ (ÖøÃûдÊÖ)

¡¾´ð°¸¡¿Ó¦Öú»ØÌû

¡ï ¡ï
youzhizhe(½ð±Ò+2): лл½»Á÷¡£ 2011-09-01 19:03:53
ÃÔ·µÄÓÎÏÀ(½ð±Ò+5): 2011-09-06 20:10:58
Õâ¸öÓ¦¸ÃÊÇϵͳµÄÅäÖÃÎļþ²¼¾Ö²»Í¬µ¼Öµģ¬debianÌåϵºÍredhatÓÐЩ¶«Î÷ÊDz»ÄÜ»¥Óõġ£ÎҼǵÃdebianÏÂÃæ¾ÍÊÇûÓÐrc.dµÄ£¬¶øÊÇÖ±½ÓµÄrc0.d,rc1.d....
ËùÒÔ£¬ÄãҪŪ¶®ÎªÊ²Ã´mauiÐèÒªredhatµÄÄǸöfunctionsºÍÕâ¸öfunctionsÀïÃæÓÐÄÄЩÊÇnauiÐèÒªµÄ£¬ÊÔÊÔ×Ô¼ºÔÚubuntuÀïÃæÕÒµ½ÕâЩfunctions£¬»òÕßÖ±½Ócopy¹ýÀ´¡£
»òÕßÄãÖ±½Óapt-get install torqueÊÔÊÔ
4Â¥2011-09-01 12:32:10
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

ÃÔ·µÄÓÎÏÀ

ľ³æ (ÕýʽдÊÖ)

ÒýÓûØÌû:
4Â¥: Originally posted by bingmou at 2011-09-01 12:32:10:
Õâ¸öÓ¦¸ÃÊÇϵͳµÄÅäÖÃÎļþ²¼¾Ö²»Í¬µ¼Öµģ¬debianÌåϵºÍredhatÓÐЩ¶«Î÷ÊDz»ÄÜ»¥Óõġ£ÎҼǵÃdebianÏÂÃæ¾ÍÊÇûÓÐrc.dµÄ£¬¶øÊÇÖ±½ÓµÄrc0.d,rc1.d....
ËùÒÔ£¬ÄãҪŪ¶®ÎªÊ²Ã´mauiÐèÒªredhatµÄÄǸöfunctionsºÍÕâ¸öfun ...

àÅ ¾ÍÊÇÕâ¸öÉËÄԽ ¹Ø¼üÊÇÎÒ¶ÔÓïÑÔÒ»Çϲ»Í¨£¬Ö±½ÓcopyÒ²ÊÔ¹ýÁ˲»ÐУ¬torqueµ¹ÊÇûÎÊÌâÄÜÓá£ËùÒÔÏ£ÍûÄÜÓÐÕâ·½ÃæµÄ¸ßÊÖ°ïÎÒ¿´¿´maui.dµÄÅäÖÃstart/stop/restart/statusÅäÖÃÒªÔõôд
5Â¥2011-09-01 12:45:02
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

bingmou

½ð³æ (ÖøÃûдÊÖ)

Ö÷ÒªÎÒ²»ÓÃÕâ¸ö£¬ËùÒÔÌá²»ÆðÐËȤȥ¿´Õâ¸ö
6Â¥2011-09-02 14:30:31
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
Ïà¹Ø°æ¿éÌø×ª ÎÒÒª¶©ÔÄÂ¥Ö÷ ÃÔ·µÄÓÎÏÀ µÄÖ÷Ìâ¸üÐÂ
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] Çóµ÷¼Á +9 Hllºú 2026-04-04 9/450 2026-04-05 13:31 by wwytracy
[¿¼ÑÐ] ÉúÎïÓëÒ½Ò©µ÷¼Á +3 Ê®Æßsa 2026-04-05 3/150 2026-04-05 13:28 by jp9609
[Óлú½»Á÷] ¼×´¼/¶þÂÈ 1:15¹ýÖù×Ó 5+3 a°¥yßÏwι 2026-03-31 3/150 2026-04-05 10:42 by 88817753
[¿¼ÑÐ] 271·ÖÇóµ÷¼ÁѧУ +12 zph158488£¡ 2026-04-02 13/650 2026-04-05 10:13 by lqwchd
[¿¼ÑÐ] 290Çóµ÷¼Á +7 luoziheng 2026-04-04 7/350 2026-04-04 23:17 by lqwchd
[¿¼ÑÐ] ²ÄÁϵ÷¼Á +10 ÀÁÑòÑòÇáÖÃÓñÍÎ 2026-04-02 11/550 2026-04-04 21:56 by laoshidan
[¿¼ÑÐ] 301Çóµ÷¼Á +18 ÂæÍÕÄÐÈË 2026-04-02 18/900 2026-04-04 20:33 by À¶ÔÆË¼Óê
[¿¼ÑÐ] µ÷¼Á +9 19945159693 2026-04-03 10/500 2026-04-04 20:16 by dongzh2009
[¿¼ÑÐ] ÇóÉúÎïѧרҵµ÷¼Á-332·Ö +5 ÔÆ¶äåÞÍäÖ¸ÄÏ 2026-04-04 5/250 2026-04-04 10:05 by rzh123456
[¿¼ÑÐ] 266·Ö£¬Ò»Ö¾Ô¸µçÆø¹¤³Ì£¬±¾¿Æ²ÄÁÏ£¬Çó²ÄÁÏרҵµ÷¼Á +9 ÍÛºôºßºôºß 2026-04-02 9/450 2026-04-03 12:05 by 1753564080
[¿¼ÑÐ] 320Çóµ÷¼Á +3 ũҵ¹¤³ÌÓëÐÅÏ¢¼ 2026-04-03 3/150 2026-04-03 11:40 by ÍÁľ˶ʿÕÐÉú
[¿¼ÑÐ] 285Çóµ÷¼Á +7 AZMK 2026-04-02 9/450 2026-04-03 11:12 by wanwan00
[¿¼ÑÐ] 273Çóµ÷¼Á +20 ÀîÜÆÐÂ1 2026-03-31 20/1000 2026-04-03 09:58 by linyelide
[¿¼ÑÐ] 285Çóµ÷¼Á +8 AZMK 2026-04-02 11/550 2026-04-02 20:16 by yulian1987
[¿¼ÑÐ] »·¾³¹¤³Ì297·ÖÇóµ÷¼ÁÒ»Ö¾Ô¸º¼¸ßÔº +15 GENJIOW 2026-03-31 16/800 2026-04-02 17:56 by cyh¡ª315
[¿¼ÑÐ] 321Çóµ÷¼Á Ò»Ö¾Ô¸ Õã½­¹¤Òµ´óѧÉúÎïÒ½Ò© +5 ºÙºÙHC 2026-04-01 6/300 2026-04-02 15:23 by sophie2180
[¿¼ÑÐ] ²ÄÁÏרҵµ÷¼Á +5 À²À²À²¿Þ 2026-03-31 6/300 2026-04-01 16:48 by JourneyLucky
[¿¼ÑÐ] 311Çóµ÷¼Á +10 ÀîÜÆÐÂ1 2026-03-31 10/500 2026-04-01 14:38 by chenqifeng666
[¿¼ÑÐ] »·¾³¹¤³Ìµ÷¼Á +9 hyzzzzzzz. 2026-04-01 9/450 2026-04-01 14:20 by salamander`
[¿¼²©] ²ÄÁÏרҵÉ격 +5 ¶ÅÓêæÃdyt 2026-03-29 5/250 2026-03-31 11:19 by oooqiao
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û