Script not working when runned by service in CentOS