Revert "Revert "services_autorun: fix for incorrect evaluation""

This reverts commit 585893d046a1c317950be53dac3375d74d3c3e2b.
Redmine#5940: definitively fix services_autorun for all agents
ensure permissions to comply with ones from postinstall script
Last byte of file should be newline, not close-curly-brace
Merge pull request #260 from phnakarin/fix#5804

Ensure permissions to comply with ones from postinstall script
Merge pull request #259 from tzz/bugfix/redmine5940-try-again

Bring services_autorun to life again