I am running postgresql but with every system reboot, the symbolic link /tmp/.s.PGSQL.5432 gets deleted so I have to manually create it through
sudo ln -s /tmp/.s.PGSQL.5432 /var/run/postgresql/.s.PGSQL.5432
and only then postgres start. Is there anyway I can automate this (say the command running at the time system starts) ? also why this /tmp link for postgres ? I am sure there is a better solution then to keep on creating the /tmp link after every reboot
I am on ubuntu 12.10 btw
EDIT – the code do look in reverse order but it is working now, see https://askubuntu.com/a/213462 too
Thanks
Add it to the startup script. You won’t need sudo as all startup scripts are run as root. It should be located in
/etc/init.d, so you can edit it withsudo vim /etc/init.d/postgres.