summarylogtreecommitdiffstats
path: root/urbackup.install
diff options
context:
space:
mode:
authork0n24d2016-06-18 17:42:58 +0200
committerk0n24d2016-06-18 17:42:58 +0200
commitd341109bc04488105efbfbeb548d22073581b41c (patch)
treea74ad2c50bf8227a6ede1ace328eb484097de415 /urbackup.install
downloadaur-d341109bc04488105efbfbeb548d22073581b41c.tar.gz
Initial version
Diffstat (limited to 'urbackup.install')
-rw-r--r--urbackup.install10
1 files changed, 10 insertions, 0 deletions
diff --git a/urbackup.install b/urbackup.install
new file mode 100644
index 00000000000..28083ae1eac
--- /dev/null
+++ b/urbackup.install
@@ -0,0 +1,10 @@
+post_install() {
+ _urbackup_user="urbackup"
+ _urbackup_group="urbackup"
+
+ getent group $_urbackup_group > /dev/null || groupadd -r $_urbackup_group > /dev/null
+ getent passwd $_urbackup_user > /dev/null || useradd -r -g $_urbackup_group \
+ -d /dev/null -s /bin/false $_urbackup_user > /dev/null
+
+ chown -hR --preserve-root $_urbackup_user:$_urbackup_group /var/urbackup
+}