summarylogtreecommitdiffstats
path: root/neo4j.install
diff options
context:
space:
mode:
Diffstat (limited to 'neo4j.install')
-rw-r--r--neo4j.install27
1 files changed, 27 insertions, 0 deletions
diff --git a/neo4j.install b/neo4j.install
new file mode 100644
index 000000000000..a035c1724d8b
--- /dev/null
+++ b/neo4j.install
@@ -0,0 +1,27 @@
+ post_install() {
+ if ! getent group neo4j >/dev/null; then
+ groupadd --system neo4j
+ fi
+ if ! getent passwd neo4j >/dev/null; then
+ useradd --system -g neo4j -d /var/lib/neo4j -s /bin/false neo4j
+ fi
+
+ chown -R neo4j.neo4j /var/lib/neo4j
+ chown -R neo4j.neo4j /var/log/neo4j
+ chown -R neo4j.neo4j /etc/neo4j
+ chown -R neo4j.neo4j /run/neo4j
+ }
+
+ post_upgrade() {
+ post_install $1
+ }
+
+ post_remove() {
+ if getent passwd neo4j >/dev/null; then
+ userdel neo4j
+ fi
+ if getent group neo4j >/dev/null; then
+ groupdel neo4j
+ fi
+ }
+ \ No newline at end of file