summarylogtreecommitdiffstats
path: root/telegraf.install
diff options
context:
space:
mode:
authorNicolas Leclercq2015-09-02 20:06:52 +0200
committerNicolas Leclercq2015-09-02 20:06:52 +0200
commit85cc60b860fe549b4bdf53e2aff7052b1e73215b (patch)
treeb5e035ad2d53b323ecc9821741d4ef1d0372827c /telegraf.install
downloadaur-85cc60b860fe549b4bdf53e2aff7052b1e73215b.tar.gz
Release 0.1.7
Diffstat (limited to 'telegraf.install')
-rw-r--r--telegraf.install10
1 files changed, 10 insertions, 0 deletions
diff --git a/telegraf.install b/telegraf.install
new file mode 100644
index 000000000000..15f23d7f1f2f
--- /dev/null
+++ b/telegraf.install
@@ -0,0 +1,10 @@
+post_install() {
+ post_upgrade
+ passwd -l telegraf &>/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 telegraf >/dev/null || groupadd telegraf
+ getent passwd telegraf >/dev/null || useradd -c 'telegraf' -g telegraf -s /bin/false telegraf
+}