1

Possible Duplicate:
Bash/Korn shell script edited on Windows throws error ‘…^M: not found’

I'm writting an Upstart job to run Postgresql:

description "PostgreSQL 9.1 Server"
author "PostgreSQL"

start on runlevel [2345]
stop on runlevel [016]
respawn
pre-start script
    if [ -d /var/run/postgresql ]; then
        chmod 2775 /var/run/postgresql
    else
        install -d -m 2775 -o postgres -g postgres /var/run/postgresql
    fi
end script
exec su -c "/usr/lib/postgresql/9.1/bin/postgres -D /var/lib/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf" postgres

If I run separate command directly from shell, they work fine. However, if they are run through Upstart... the folder gets named /var/run/postgresql?.

Note the question mark at the end. Why does it occur??

U2ros
  • 245

0 Answers0