summaryrefslogtreecommitdiff
path: root/pcr/perspectives-server/perspectives-server.install
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/perspectives-server/perspectives-server.install')
-rw-r--r--pcr/perspectives-server/perspectives-server.install27
1 files changed, 27 insertions, 0 deletions
diff --git a/pcr/perspectives-server/perspectives-server.install b/pcr/perspectives-server/perspectives-server.install
new file mode 100644
index 000000000..d07664cb7
--- /dev/null
+++ b/pcr/perspectives-server/perspectives-server.install
@@ -0,0 +1,27 @@
+_chown() {
+ chown -R perspectives:perspectives \
+ /usr/share/webapps/perspectives-server \
+ /etc/webapps/perspectives-server \
+ /etc/conf.d/perspectives-server.conf
+}
+
+post_install() {
+ groupadd --system perspectives
+
+ useradd --system \
+ --comment "Perspectives Notary Server" \
+ --gid perspectives \
+ --home /usr/share/webapps/perspectives-server -M \
+ --shell /bin/false \
+ perspectives &>/dev/null
+ _chown
+}
+
+post_upgrade() {
+ _chown
+}
+
+post_remove() {
+ userdel perspectives
+ groupdel perspectives
+}