summaryrefslogtreecommitdiff
path: root/pcr/openrc-devel/postgresql.install
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/openrc-devel/postgresql.install')
-rw-r--r--pcr/openrc-devel/postgresql.install19
1 files changed, 19 insertions, 0 deletions
diff --git a/pcr/openrc-devel/postgresql.install b/pcr/openrc-devel/postgresql.install
new file mode 100644
index 000000000..e54258ecb
--- /dev/null
+++ b/pcr/openrc-devel/postgresql.install
@@ -0,0 +1,19 @@
+_svc="postgresql"
+_rlvl="default"
+
+post_install() {
+ local datadir="/var/lib/data"
+ echo " ==> requires datadir $datadir"
+ echo " ==> run as user postgres: 'initdb -D $datadir'"
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}