Fix some problems with the init.d script

Signed-off-by: Lucas Dutra Nunes <ldnunes@ossystems.com.br>