diff options
author | Mike Williamson | 2015-05-08 12:49:05 -0400 |
---|---|---|
committer | Mike Williamson | 2015-05-08 12:49:05 -0400 |
commit | 6f3feb721ee89a2186d8638a1f34dde7be4a146b (patch) | |
tree | afa672010d02c6af0955c77a9b73acdf4e050699 /arangodb.install | |
download | aur-6f3feb721ee89a2186d8638a1f34dde7be4a146b.tar.gz |
Initial commit
Diffstat (limited to 'arangodb.install')
-rw-r--r-- | arangodb.install | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/arangodb.install b/arangodb.install new file mode 100644 index 000000000000..93aa43c31643 --- /dev/null +++ b/arangodb.install @@ -0,0 +1,79 @@ +pre_install() { + getent group arangodb >/dev/null || groupadd -r arangodb + getent passwd arangodb >/dev/null || useradd -r -g arangodb -d \ + /usr/share/arangodb -s /bin/false -c "ArangoDB Application User" \ + arangodb + + install -o arangodb -g arangodb -m 755 -d /var/lib/arangodb + install -o arangodb -g arangodb -m 755 -d /var/lib/arangodb-apps + install -o arangodb -g arangodb -m 755 -d /var/log/arangodb + install -o arangodb -g arangodb -m 755 -d /var/run/arangodb +} + +post_install() { + + chown arangodb:arangodb /var/lib/arangodb &> /dev/null + chown arangodb:arangodb /var/lib/arangodb-apps &> /dev/null + chown arangodb:arangodb /var/log/arangodb &> /dev/null + + cat <<-EOF + + Welcome to ArangoDB. + + To get started you will need to enable and start the service: + + sudo systemctl enable arangodb.service + sudo systemctl start arangodb.service + + Then you can access the administrative interface at: + + http://localhost:8529 + + or try things out at the shell: + + $> arangosh + + Getting help: + http://stackoverflow.com/questions/tagged/arangodb + https://groups.google.com/forum/#!forum/arangodb + https://docs.arangodb.com/cookbook/ + https://docs.arangodb.com/ + #arangodb on irc.freenode.net + +EOF +} + +post_upgrade() { + cat <<-EOF + + The format of some of ArangoDB's internal files change sometimes + between versions. To upgrade existing data files run /usr/bin/arangod + with the upgrade option: + + sudo arangod --upgrade + + You might also need to reload the systemd service definition: + + sudo systemctl daemon-reload + + Or restart the service: + + sudo systemctl restart arangodb.service + +EOF +} + +pre_remove() { + systemctl stop arangodb.service &> /dev/null +} + +post_remove() { + userdel arangodb &> /dev/null + groupdel arangodb &> /dev/null + # remove all the files + rm -rf /usr/share/arangodb/js/apps + rm -rf /var/log/arangodb + rm -rf /var/lib/arangodb + rm -rf /var/lib/arangodb-apps + rm -rf /var/run/arangodb +} |