diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-04-02 04:06:07 +0000 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-04-02 04:06:07 +0000 |
commit | c667b77b6719baf541fff1a3e0a855d1ca7c6433 (patch) | |
tree | 160a3ef2cadf16ee901ebbfb33235a840565a41c /community/rethinkdb/rethinkdb.install | |
parent | 0918b213023626f9fb5958a5927263aa4d2ea28b (diff) |
Wed Apr 2 04:01:38 UTC 2014
Diffstat (limited to 'community/rethinkdb/rethinkdb.install')
-rw-r--r-- | community/rethinkdb/rethinkdb.install | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/community/rethinkdb/rethinkdb.install b/community/rethinkdb/rethinkdb.install index 8c74c4f0b..447779953 100644 --- a/community/rethinkdb/rethinkdb.install +++ b/community/rethinkdb/rethinkdb.install @@ -2,7 +2,9 @@ post_install() { groupadd rethinkdb &>/dev/null useradd -g rethinkdb -d /var/lib/rethinkdb -s /bin/false rethinkdb &>/dev/null - /usr/bin/systemd-tmpfiles --create rethinkdb.conf + if type -P systemd-tmpfiles &> /dev/null; then + systemd-tmpfiles --create rethinkdb.conf + fi if [ -d /var/lib/rethinkdb ]; then echo "Database directory '/var/lib/rethinkdb' already exists. If you want to recreate default database then delete the directory and run 'rethinkdb create -d /var/lib/rethinkdb/default'." @@ -19,16 +21,6 @@ post_upgrade() { IFS='.' read -a new_version <<< "$1" IFS='.' read -a old_version <<< "$2" - # previously data diecotry was /var/lib/rethinkdb/ - # now we moved to multi-instance location: /var/lib/rethinkdb/default - # convert from previous location, remove this check Q3'13 - if [ -e /var/lib/rethinkdb/metadata -a ! -d /var/lib/rethinkdb/default ]; then - echo "You store rethinkdb data in /var/lib/rethinkdb. Moving this data to per-instance location /var/lib/rethinkdb/default." - mkdir /var/lib/rethinkdb/default - mv /var/lib/rethinkdb/* /var/lib/rethinkdb/default - chown -R rethinkdb:rethinkdb /var/lib/rethinkdb - fi - if [ "${old_version[0]}" != "${new_version[0]}" -o "${old_version[1]}" != "${new_version[1]}" ]; then echo "This release changed data storage format. Please upgrade your data using following information https://github.com/rethinkdb/rethinkdb/tree/next/scripts/migration" fi @@ -38,8 +30,6 @@ post_upgrade() { } post_remove() { - #/usr/bin/systemctl stop rethinkdb@default.service - getent passwd rethinkdb >/dev/null && userdel rethinkdb getent group rethinkdb >/dev/null && groupdel rethinkdb |