loaded syslogd for logger cmd works

Also moved the declare statement above the script into the variables section