pyLoad autostart

I already install pyLoad in to my router - everythinkg works propery until I try prepare my own int.d spript for auto start procedure pyload. Bellow script :

#!/bin/sh /etc/rc.common
# Copyright (C) 2010-2015 OpenWrt.org
START=99
STOP=10
USE_PROCD=1
PROG="/usr/bin/pyload"
start_service() {
                procd_open_instance
                procd_set_param command "$PROG"
                procd_append_param command --userdir /etc/pyload
                procd_set_param stderr 1
                procd_set_param respawn
                procd_close_instance
}

after creating the file, I executed this command

chmod +x /etc/init.d/pyload

BUT when I try start pyload via

service pyload enable

it shows always

': No such file or directory.common

Any ide what is wrong ?

Open your init script using the vi editor and look for carriage return characters (^M).

vi /etc/init.d/pyload

If you see any, exit (type :q! and press Enter) and execute the following command:

sed -i -e 's/\r//g' /etc/init.d/pyload