initial commit of file from CVS for smeserver-postgresql on Sat Sep 7 20:54:55 AEST 2024

This commit is contained in:
Trevor Batley
2024-09-07 20:54:55 +10:00
parent 6c56fcfdd0
commit 2b48c863cb
40 changed files with 1750 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
#! /bin/sh
cd /var/lib/pgsql/13 && \
find . -type f | xargs rm -f && \
rm -rf data/*

View File

@@ -0,0 +1,3 @@
#!/bin/sh
exec /bin/rm -f /home/e-smith/db/pgsql/pgsql.dump

View File

@@ -0,0 +1,15 @@
#!/bin/sh
status=$(/sbin/e-smith/config getprop postgresql status)
if [ "$status" = "disabled" ]
then
echo "postgresql is disabled - no tables dumped" >&2
exit 0
fi
pgdumpall="/usr/pgsql-13/bin/pg_dumpall"
#avoid error could not change directory to
cd /tmp
umask 027
exec >/home/e-smith/db/pgsql/pgsql.dump
chgrp postgres /home/e-smith/db/pgsql/pgsql.dump
exec chpst -u postgres $pgdumpall