summarylogtreecommitdiffstats
path: root/mattermost.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mattermost.sh')
-rw-r--r--mattermost.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/mattermost.sh b/mattermost.sh
new file mode 100644
index 000000000000..08b9ea965bb9
--- /dev/null
+++ b/mattermost.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+set -e
+
+cd /usr/share/webapps/mattermost
+
+if [[ "$USER" = "mattermost" ]]; then
+ exec bin/platform "$@"
+else
+ exec sudo -u mattermost bin/platform "$@"
+fi