summaryrefslogtreecommitdiff
path: root/pcr/openrc-devel/postgresql.install
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2015-10-17 05:05:17 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2015-10-17 05:05:17 -0500
commit2eba4176c3accb245bfc3f950b45c84dccaddafd (patch)
treeab36b4bdb99a636662ec2394389190d37cc276e1 /pcr/openrc-devel/postgresql.install
parent19f95c7d623dcca230cc1340efaacf4de4423e93 (diff)
openrc-devel: add new package to [pcr]
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}'"
+}