summaryrefslogtreecommitdiffstats
path: root/initdb.in
diff options
context:
space:
mode:
authorJozef Mlich <imlich@fit.vutbr.cz>2014-12-01 15:36:28 +0100
committerPavel Raiskup <praiskup@redhat.com>2014-12-01 16:03:08 +0100
commit0fbb585f1f7c23fc7256b305845c83198c6992ef (patch)
tree026a1df4bbfa1ba8adb930ae3769c0d48e69c48f /initdb.in
parent9dfef4352bb428fc5eeddc0a2b4cd4ac6ab297dd (diff)
downloadpostgresql-setup-0fbb585f1f7c23fc7256b305845c83198c6992ef.tar.gz
postgresql-setup-0fbb585f1f7c23fc7256b305845c83198c6992ef.tar.xz
postgresql-setup-0fbb585f1f7c23fc7256b305845c83198c6992ef.zip
systemd: added systemd's legacy scripts
* Makefile.am: (systemdlegacyscriptsdir) (nodist_systemdlegacyscrupts_DATA): New variables. (initdb, upgrade): New targets. * initdb.in: New legacy script template. * upgrade.in: Likewise. * .gitignore: Ignore newly generated scripts.
Diffstat (limited to 'initdb.in')
-rw-r--r--initdb.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/initdb.in b/initdb.in
new file mode 100644
index 0000000..c238574
--- /dev/null
+++ b/initdb.in
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# Legacy action script for "service postgresql initdb"
+
+# Find the name of the service
+SERVICE_NAME=$(basename $(dirname "$0"))
+if [ x"$SERVICE_NAME" = x. ]
+then
+ SERVICE_NAME=postgresql
+fi
+
+echo Hint: the preferred way to do this is now '"postgresql-setup initdb"' >&2
+
+/usr/bin/postgresql-setup initdb "$SERVICE_NAME"
+
+exit $?