summaryrefslogtreecommitdiff
path: root/www-servers/automx2/files/init
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
commit21435953e16cda318a82334ddbadb3b5c36d9ea7 (patch)
treee1810a4b135afce04b34862ef0fab2bfaeb8aeca /www-servers/automx2/files/init
parent7bc9c63c9da678a7e6fceb095d56c634afd22c56 (diff)
gentoo resync : 15.01.2020
Diffstat (limited to 'www-servers/automx2/files/init')
-rw-r--r--www-servers/automx2/files/init26
1 files changed, 26 insertions, 0 deletions
diff --git a/www-servers/automx2/files/init b/www-servers/automx2/files/init
new file mode 100644
index 000000000000..466461a6cd93
--- /dev/null
+++ b/www-servers/automx2/files/init
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 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="@EPYTHON@"
+ export FLASK_APP="automx2.server:app"
+ export FLASK_ENV="production"
+}