### 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
|
|
33 | 33 | |
34 | 34 | start() { |
35 | 35 | 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` |
37 | 37 | ebegin "Starting Deluged" |
38 | 38 | start-stop-daemon --start --user "${DELUGED_USER}" \ |
39 | 39 | --name deluged --pidfile /var/run/deluged.pid --background --make-pidfile \ |