[arch-commits] Commit in rethinkdb/trunk (rethinkdb.install)
Anatol Pomozov
anatolik at archlinux.org
Mon Feb 9 21:25:03 UTC 2015
Date: Monday, February 9, 2015 @ 22:25:03
Author: anatolik
Revision: 127441
Do not remove users during uninstall
https://www.archlinux.org/todo/usergroup-management/
Modified:
rethinkdb/trunk/rethinkdb.install
-------------------+
rethinkdb.install | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
Modified: rethinkdb.install
===================================================================
--- rethinkdb.install 2015-02-09 21:20:47 UTC (rev 127440)
+++ rethinkdb.install 2015-02-09 21:25:03 UTC (rev 127441)
@@ -1,6 +1,6 @@
post_install() {
- groupadd rethinkdb &>/dev/null
- useradd -g rethinkdb -d /var/lib/rethinkdb -s /bin/false rethinkdb &>/dev/null
+ getent group rethinkdb >/dev/null && groupadd --system rethinkdb &>/dev/null
+ getent passwd rethinkdb >/dev/null && useradd --system -g rethinkdb -d /var/lib/rethinkdb -s /bin/false rethinkdb &>/dev/null
if type -P systemd-tmpfiles &> /dev/null; then
systemd-tmpfiles --create rethinkdb.conf
@@ -17,14 +17,6 @@
chown -R rethinkdb:rethinkdb /var/lib/rethinkdb
}
-post_upgrade() {
- getent group rethinkdb >/dev/null 2>&1 || groupadd rethinkdb &>/dev/null
- getent passwd rethinkdb >/dev/null 2>&1 || useradd -g rethinkdb -d /var/lib/rethinkdb -s /bin/false rethinkdb &>/dev/null
-}
-
post_remove() {
- getent passwd rethinkdb >/dev/null && userdel rethinkdb
- getent group rethinkdb >/dev/null && groupdel rethinkdb
-
echo "RethinkDB data directory '/var/lib/rethinkdb' is left untouched. Remove it if you really sure you won't need your data in the future."
}
More information about the arch-commits
mailing list