summarylogtreecommitdiffstats
path: root/facette.install
diff options
context:
space:
mode:
authorNicolas Leclercq2015-06-12 18:33:17 +0200
committerNicolas Leclercq2015-06-12 18:33:17 +0200
commit3930b4fe0ef6620fee7aa2129d432287300115ee (patch)
tree7bdd2eb8bb2d93349fdfde0be7bc733c09f06834 /facette.install
downloadaur-3930b4fe0ef6620fee7aa2129d432287300115ee.tar.gz
Migrating from aur3
Diffstat (limited to 'facette.install')
-rw-r--r--facette.install21
1 files changed, 21 insertions, 0 deletions
diff --git a/facette.install b/facette.install
new file mode 100644
index 000000000000..3a1fceb34909
--- /dev/null
+++ b/facette.install
@@ -0,0 +1,21 @@
+post_install() {
+ post_upgrade
+ passwd -l facette &>/dev/null
+}
+
+post_upgrade() {
+ # create user/group that the daemon will run as by default, do not delete this on uninstall, as it will own files
+ getent group facette >/dev/null || groupadd facette
+ getent passwd facette >/dev/null || useradd -c 'facette' -g facette -b '/var/lib' -m -s /bin/false facette
+
+ chown facette:facette /etc/facette
+ chmod 755 /etc/facette
+ chmod 644 /etc/facette/facette.json
+ chmod 755 /etc/facette/providers
+
+ chown facette:facette /var/run/facette
+ chmod 755 /var/run/facette
+
+ chown facette:facette /var/log/facette
+ chmod 755 /var/log/facette
+}