Ticket #8545: ushare.diff

File ushare.diff, 1.0 KB (added by flux, 5 years ago)

/etc/init.d/ushare patch

  • etc/init.d/ushare

     
    3333        config_get content_directories  "$section" "content_directories" 
    3434        append_bool                     "$section" "disable_webif" "-w" 
    3535        append_bool                     "$section" "disable_telnet" "-t" 
    36         config_get_bool "enabled"       "$section" "enabled" '1' 
     36        config_get_bool "enabled"       "$section" "enabled" '0' 
    3737 
    38         [ "$enabled" -gt 0 ] && $SSD -x $BIN -c ${username:-nobody} -S -b -p /var/run/ushare.pid -m -- -n ${servername:-OpenWrt} -i ${interface:-br-lan} -c ${content_directories:-/tmp} $args ${options} & 
     38        local content_dir 
     39        for content_dir in $content_directories; do 
     40                append args "-c $content_dir" 
     41        done 
     42        [ "$enabled" -gt 0 ] && $SSD -x $BIN -c ${username:-nobody} -S -b -p /var/run/ushare.pid -m -- -n ${servername:-OpenWrt} -i ${interface:-br-lan} $args ${options} & 
    3943} 
    4044 
    4145stop_service() { 
     
    4448        config_get username             "$section" "username" 
    4549 
    4650        $SSD -K -x $BIN -c ${username:-nobody} -s 2 -p /var/run/ushare.pid 
     51        sleep 1 
    4752} 
    4853 
    4954start() {