summaryrefslogtreecommitdiff
path: root/pcr/mosquitto/mosquitto.install
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/mosquitto/mosquitto.install')
-rw-r--r--pcr/mosquitto/mosquitto.install15
1 files changed, 15 insertions, 0 deletions
diff --git a/pcr/mosquitto/mosquitto.install b/pcr/mosquitto/mosquitto.install
new file mode 100644
index 000000000..b2dfb9600
--- /dev/null
+++ b/pcr/mosquitto/mosquitto.install
@@ -0,0 +1,15 @@
+post_install() {
+ getent group mosquitto > /dev/null || groupadd mosquitto
+ getent passwd mosquitto > /dev/null || useradd -c 'Mosquitto MQTT Broker daemon' -d /etc/mosquitto -s /bin/false -g mosquitto mosquitto
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+ echo "You may want to remove mosquitto user and group"
+}
+
+# vim:set ts=2 sw=2 et: