Want more timely Centmin Mod News Updates?
Become a Member

patch unexpectedly ends in middle of line

Discussion in 'Install & Upgrades or Pre-Install Questions' started by pamamolf, Feb 16, 2016.

  1. pamamolf

    pamamolf Well-Known Member

    2,521
    231
    63
    May 31, 2014
    Ratings:
    +394
    Local Time:
    12:12 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Hi

    I just download latest Centminmod beta and when i open it i got:

    Code:
    adjusting pure-ftpd passive port range for CSF Firewall
    
    patch unexpectedly ends in middle of line
    Don't know what is it and if it is a problem or not so i just post it here :)

    It was update ccache and then i got this....
     
    • Informative Informative x 1
  2. eva2000

    eva2000 Administrator Staff Member

    29,016
    6,584
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,774
    Local Time:
    7:12 AM
    Nginx 1.13.x
    MariaDB 5.5
    thanks it's a memcached 1.45 patch for init.d changes but your copy of centmin mod already had those changes

    can you post output of your /etc/init.d/memcached in CODE tags
     
  3. pamamolf

    pamamolf Well-Known Member

    2,521
    231
    63
    May 31, 2014
    Ratings:
    +394
    Local Time:
    12:12 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Code:
    #!/bin/sh
    # chkconfig: - 80 12
    # description:  The memcached daemon is a network memory cache service.
    # processname: memcached
    BINNAME=memcached
    BIN=/usr/local/bin/memcached
    USER=nobody
    LOGGING='n'
    LOGFILE="/var/log/memcached.log"
    LOGFILEB="/var/log/memcached2.log"
    CON=1024
    THREADS=4
    MINSP=72
    CHUNKF=1.25
    PORT1=11211
    PORT2=11212
    MEMSIZE=16
    SERVERCOUNT=1
    SERVERIP='127.0.0.1'
    OPTIONS='-o slab_reassign,slab_automove'
    
    # 1.4.25 new slab options
    # https://github.com/memcached/memcached/wiki/ReleaseNotes1425
    MEM_CURVER=$(/usr/local/bin/memcached -V | awk '{print $2}' | head -n1 | sed -e 's|\.|00|g')
    if [[ "$MEM_CURVER" -ge '10040025' ]]; then
            OPTIONS='-o slab_reassign,slab_automove,lru_crawler,lru_maintainer,maxconns_fast,hash_algorithm=murmur3'
    fi
    
    if [ -f /proc/user_beancounters ]; then
    ulimit -s 256
    fi
    
    DEBUG='n'
    CPUSET='n'
    #############################
    
    processcheck() {
    PROCESS=$(ps ax | grep memcached | grep -Ev '(grep|memcached status|memcached start|memcached stop|memcached restart|memcached_reinstall)')
    CHECKM=${PROCESS:-nomemcached}
    }
    
    setcpu() {
    if [ "$CPUSET" == 'y' ]; then
        CORECHECK=$(taskset -pc $(pidof memcached) | awk -F ': ' '{print $2}' | awk -F ',' '{print $3}')
        if [ "$CORECHECK" == '3' ]; then
        taskset -pc 3 $(pidof memcached) 2>&1 >/dev/null
        fi
    fi
    }
    
    twomem() {
    processcheck
    
    if [ "$DEBUG" == 'y' ]; then
    echo $CHECKM
    fi
    
    if [[ "$CHECKM" == 'nomemcached' ]]; then
        echo "Memcached server started "
            if [[ "$LOGGING" = [yY] ]]; then
            $BIN -d -m $MEMSIZE -l $SERVERIP -p $PORT1 -c $CON -t $THREADS -n $MINSP -f $CHUNKF -u $USER $OPTIONS -vv > $LOGFILE 2>&1
            $BIN -d -m $MEMSIZE -l $SERVERIP -p $PORT2 -c $CON -t $THREADS -n $MINSP -f $CHUNKF -u $USER $OPTIONS -vv > $LOGFILEB 2>&1
            else
        $BIN -d -m $MEMSIZE -l $SERVERIP -p $PORT1 -c $CON -t $THREADS -n $MINSP -f $CHUNKF -u $USER $OPTIONS
        $BIN -d -m $MEMSIZE -l $SERVERIP -p $PORT2 -c $CON -t $THREADS -n $MINSP -f $CHUNKF -u $USER $OPTIONS
            fi
    else
        echo "Memcached server already running "
    fi
    
    }
    
    onemem() {
    processcheck
    
    if [ "$DEBUG" == 'y' ]; then
    echo $CHECKM
    fi
    
    if [[ "$CHECKM" == 'nomemcached' ]]; then
        echo "Memcached server started "
            if [[ "$LOGGING" = [yY] ]]; then
            $BIN -d -m $MEMSIZE -l $SERVERIP -p $PORT1 -c $CON -t $THREADS -n $MINSP -f $CHUNKF -u $USER $OPTIONS -vv > $LOGFILE 2>&1
            else
        $BIN -d -m $MEMSIZE -l $SERVERIP -p $PORT1 -c $CON -t $THREADS -n $MINSP -f $CHUNKF -u $USER $OPTIONS
            fi
    else
        echo "Memcached server already running "
    fi
    }
    
    mstart() {
    if [ "$SERVERCOUNT" == '2' ]; then
        twomem
    elif  [ "$SERVERCOUNT" == '1' ]; then
        onemem
        setcpu
    fi
    }
    
    mstop() {
    processcheck
    
    if [ "$DEBUG" == 'y' ]; then
    echo $CHECKM
    fi
    
    if [[ "$CHECKM" != 'nomemcached' ]]; then
        echo "Memcached server stopped "
        killall $BIN 2>/dev/null
    else
        echo "Memcached server already stopped "
    fi
    }
    
    mstatus() {
    processcheck
    
    if [ "$DEBUG" == 'y' ]; then
    echo $CHECKM
    fi
    
    if [[ "$CHECKM" == 'nomemcached' ]]; then
        echo "Memcached server not running "
    else
        echo "Memcached server is running "
    fi
    }
    
    #############################
    
    if [[ "$SERVERCOUNT" == '2' && ! "$1" ]]; then
            twomem
    elif  [[ "$SERVERCOUNT" == '1' && ! "$1" ]]; then
            onemem
            setcpu
            #echo "1=${1} 2=${2}" #debug
    fi
    
    case "$1" in
    start)
    
    mstart
    
    ;;
    stop)
    
    mstop
    
    ;;
    restart)            
    
    mstop
    sleep 2
    mstart
    
    ;;
    status)
    
    mstatus
    
    ;;
    esac
     
  4. eva2000

    eva2000 Administrator Staff Member

    29,016
    6,584
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,774
    Local Time:
    7:12 AM
    Nginx 1.13.x
    MariaDB 5.5
    yup patched ended as you already had those changes in your copy
    Code:
    # 1.4.25 new slab options
    # https://github.com/memcached/memcached/wiki/ReleaseNotes1425
    MEM_CURVER=$(/usr/local/bin/memcached -V | awk '{print $2}' | head -n1 | sed -e 's|\.|00|g')
    if [[ "$MEM_CURVER" -ge '10040025' ]]; then
            OPTIONS='-o slab_reassign,slab_automove,lru_crawler,lru_maintainer,maxconns_fast,hash_algorithm=murmur3'
    fi