summaryrefslogtreecommitdiff
path: root/net-mail/automx2/files/init-r1
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-10-20 10:22:14 +0100
committerV3n3RiX <venerix@koprulu.sector>2021-10-20 10:22:14 +0100
commit46eedbedafdb0040c37884982d4c775ce277fb7b (patch)
treedb33a91259730be84999e13a8d8168c799f50ac0 /net-mail/automx2/files/init-r1
parente23a08d0c97a0cc415aaa165da840b056f93c997 (diff)
gentoo resync : 20.10.2021
Diffstat (limited to 'net-mail/automx2/files/init-r1')
-rw-r--r--net-mail/automx2/files/init-r126
1 files changed, 26 insertions, 0 deletions
diff --git a/net-mail/automx2/files/init-r1 b/net-mail/automx2/files/init-r1
new file mode 100644
index 000000000000..56878e8ca379
--- /dev/null
+++ b/net-mail/automx2/files/init-r1
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+: ${AUTOMX2_CONF:="/etc/${RC_SVCNAME}.conf"}
+: ${AUTOMX2_USER:="automx2"}
+: ${AUTOMX2_ARGS:="--port 4243"}
+
+command="/usr/bin/python"
+command_args="/usr/bin/flask run ${AUTOMX2_ARGS}"
+command_background="true"
+command_user="${AUTOMX2_USER}"
+pidfile="/run/${RC_SVCNAME}.pid"
+required_files="${AUTOMX2_CONF}"
+
+depend() {
+ use logger net
+ before nginx
+}
+
+start_pre() {
+ export AUTOMX2_CONF
+ export EPYTHON="python"
+ export FLASK_APP="automx2.server:app"
+ export FLASK_ENV="production"
+}