Ticket #728: etc-init.d-deluge.patch

File etc-init.d-deluge.patch, 731 bytes (added by dev@…, 13 years ago)

minor patch to resolve the issue.

  • /etc/init.d/deluged

    ### Patch to fix /etc/init.d/deluged from choosing the wrong user home 
    ### directory when there username set in ${DELUGED_USER}, also appears
    ### inside of another username.
    old new  
    3333 
    3434start() { 
    3535        checkconfig || return $? 
    36         DELUGED_USER_HOME=`getent passwd | grep $( echo "${DELUGED_USER}" | cut -d ':' -f 1 ) | cut -d ':' -f 6` 
     36        DELUGED_USER_HOME=`getent passwd | grep ^$( echo "${DELUGED_USER}" | cut -d ':' -f 1 ): | cut -d ':' -f 6` 
    3737        ebegin "Starting Deluged" 
    3838        start-stop-daemon --start --user "${DELUGED_USER}" \ 
    3939        --name deluged --pidfile /var/run/deluged.pid --background --make-pidfile \