<div dir="ltr">you beauty! thanks a lot, after a couple of hours messing around with paths (and trying to find the check_db utility, which doesn't appear to have made it to the debian package) it all seems to work now :)<div><br></div><div>thanks :)</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 12 September 2014 09:07, Rob <span dir="ltr"><<a href="mailto:rob@mrrob.info" target="_blank">rob@mrrob.info</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 11/09/14 18:07, Marcus Holmes wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
so I was happily on 9.3 and then I moved to Jessie (so I could get<br>
Docker working, a whole other story), which upgraded me to 9.4, but the<br>
upgrade flunked the database upgrade so I was left running mismatched<br>
versions of database and server (or something... it wasn't happy<br>
anyway). So. nuke the site from orbit, purge everything and start again.<br>
Lucky it was all just dev and test databases.<br>
<br>
But, and here's the problem: Jessie uses systemd and the 9.4 install<br>
doesn't seem to actually create the .service files needed to kick the<br>
server off on boot (it does come with a lovely init.d script that then<br>
doesn't appear to get called by systemd). And I can't find a decent<br>
guide to writing .service files for 9.4 anywhere.<br>
<br>
Anyone know of a way of either getting systemd to call the init.d<br>
script, or better yet, a decent guide for the uninitiated on writing a<br>
.service file?<br>
<br>
Thanks in advance for any help...<br>
<br>
Marcus<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
PLUG discussion list: <a href="mailto:plug@plug.org.au" target="_blank">plug@plug.org.au</a><br>
<a href="http://lists.plug.org.au/mailman/listinfo/plug" target="_blank">http://lists.plug.org.au/<u></u>mailman/listinfo/plug</a><br>
Committee e-mail: <a href="mailto:committee@plug.org.au" target="_blank">committee@plug.org.au</a><br>
PLUG Membership: <a href="http://www.plug.org.au/membership" target="_blank">http://www.plug.org.au/<u></u>membership</a><br>
<br>
</blockquote>
<br>
I can't give any advice as to where to learn to write them but below is the Arch Linux postgresql-testing(ver. 9.4beta2) postgresql.service file. I retrieved it from: <a href="https://aur.archlinux.org/packages/po/postgresql-testing/postgresql-testing.tar.gz" target="_blank">https://aur.archlinux.org/<u></u>packages/po/postgresql-<u></u>testing/postgresql-testing.<u></u>tar.gz</a>. I'm sure you could make a basic one to execute the init.d scripts if this doesn't work.<br>
<br>
[Unit]<br>
Description=PostgreSQL database server<br>
After=network.target<br>
<br>
[Service]<br>
Type=forking<br>
TimeoutSec=120<br>
User=postgres<br>
Group=postgres<br>
<br>
Environment=PGROOT=/var/lib/<u></u>postgres<br>
<br>
SyslogIdentifier=postgres<br>
PIDFile=/var/lib/postgres/<u></u>data/postmaster.pid<br>
<br>
ExecStartPre=/usr/bin/<u></u>postgresql-check-db-dir ${PGROOT}/data<br>
ExecStart= /usr/bin/pg_ctl -s -D ${PGROOT}/data start -w -t 120<br>
ExecReload=/usr/bin/pg_ctl -s -D ${PGROOT}/data reload<br>
ExecStop= /usr/bin/pg_ctl -s -D ${PGROOT}/data stop -m fast<br>
<br>
# Due to PostgreSQL's use of shared memory, OOM killer is often overzealous in<br>
# killing Postgres, so adjust it downward<br>
OOMScoreAdjust=-200<br>
<br>
[Install]<br>
WantedBy=multi-user.target<br>
<br>
<br>
---<br>
mrrob<br>
---<br>
______________________________<u></u>_________________<br>
PLUG discussion list: <a href="mailto:plug@plug.org.au" target="_blank">plug@plug.org.au</a><br>
<a href="http://lists.plug.org.au/mailman/listinfo/plug" target="_blank">http://lists.plug.org.au/<u></u>mailman/listinfo/plug</a><br>
Committee e-mail: <a href="mailto:committee@plug.org.au" target="_blank">committee@plug.org.au</a><br>
PLUG Membership: <a href="http://www.plug.org.au/membership" target="_blank">http://www.plug.org.au/<u></u>membership</a><br>
</blockquote></div><br></div>