annotate files/uwsginl.in @ 2:003d10e103ef

A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins. The additional plugins are: - cgi - clock_realtime - echo - logpipe And all the default embedded plugins from "base.ini" are embedded too (of course). The big difference of the "nolang" profile to "core" is that core has no embedded plugins.
author Franz Glasner <hg@dom66.de>
date Fri, 15 Sep 2017 21:59:09 +0200
parents files/uwsgi.in@748e69c58ee3
children 70b8e449d563
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
1 #!/bin/sh
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
2 #
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
3 # $FreeBSD$
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
4 #
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
5 # PROVIDE: uwsginl
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
6 # REQUIRE: DAEMON
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
7 # KEYWORD: shutdown
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
8 #
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
9 # Add the following lines to /etc/rc.conf to enable uwsgi:
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
10 #
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
11 # uwsginl_enable (bool): Set it to "YES" to enable uwsgi
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
12 # Default is "NO".
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
13 # uwsginl_socket (path/str): Set the path to the uwsgi unix socket
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
14 # Default is /tmp/uwsginl.sock.
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
15 # uwsginl_socket_mode (int): Set the mode of the socket.
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
16 # Default is 660.
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
17 # uwsginl_socket_owner (str): Set the owner of the socket.
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
18 # Default is uwsgi:www.
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
19 # uwsginl_emperor (bool): Set it to "YES" to run uwsgi in emperor mode
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
20 # Default is "NO".
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
21 # uwsginl_configfile (path): Set the path to the config file
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
22 # Default is %%PREFIX%%/etc/uwsginl/uwsginl.ini.
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
23 # uwsginl_vassals_dir (path): Set the path to the vassals directory
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
24 # Default is %%PREFIX%%/etc/uwsginl/vassals.
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
25 # uwsginl_logfile (path): Set the path to the uwsgi log file
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
26 # Default is /var/log/uwsginl.log.
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
27 # uwsginl_pidfile (path): Set the path to the uwsgi pid file
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
28 # Default is /var/run/uwsginl.pid.
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
29 # uwsginl_uid (int): Set the UID of the process to run with
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
30 # Default is uwsgi.
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
31 # uwsginl_gid (int): Set the GID of the process to run with
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
32 # Default is uwsgi.
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
33 # uwsginl_flags (str): Set the uwsgi command line arguments
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
34 # Default is "-L".
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
35 # uwsginl_procname (str): Define to "uWSGI" if you start uwsgi with
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
36 # --auto-procname option.
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
37 #
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
38 # If you would like to have multiple uWSGI instances running, you can
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
39 # define multiple profiles:
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
40 #
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
41 # uwsginl_profiles (str): Set the list of uwsgi profiles
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
42 # Default is "".
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
43 #
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
44 # For each profile you can then define different options (except for
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
45 # uwsginl_enable) using the syntax uwsginl_<profile>_<option>
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
46
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
47 . /etc/rc.subr
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
48
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
49 name="uwsginl"
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
50 rcvar=uwsginl_enable
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
51
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
52 load_rc_config $name
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
53
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
54 command=%%PREFIX%%/bin/uwsginl
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
55
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
56 : ${uwsginl_enable="NO"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
57 : ${uwsginl_socket="/tmp/${name}.sock"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
58 : ${uwsginl_socket_mode="660"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
59 : ${uwsginl_socket_owner="uwsgi:www"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
60 : ${uwsginl_configfile="%%PREFIX%%/etc/uwsginl/uwsginl.ini"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
61 : ${uwsginl_profiles=""}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
62 : ${uwsginl_logfile="/var/log/${name}.log"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
63 : ${uwsginl_pidfile="/var/run/${name}.pid"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
64 : ${uwsginl_uid="uwsgi"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
65 : ${uwsginl_gid="uwsgi"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
66 : ${uwsginl_flags="-L"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
67 : ${uwsginl_emperor="NO"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
68 : ${uwsginl_vassals_dir="%%PREFIX%%/etc/uwsginl/vassals"}
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
69
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
70 is_uwsginl_profile() {
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
71 local profile
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
72
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
73 for profile in $uwsginl_profiles; do
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
74 if [ "$profile" = "$1" ]; then
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
75 return 0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
76 fi
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
77 done
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
78
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
79 return 1
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
80 }
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
81
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
82 if [ -n "${uwsginl_profiles}" ]; then
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
83 if [ -n "$2" ]; then
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
84 profile="$2"
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
85 if ! is_uwsginl_profile $profile; then
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
86 echo "$0: no such profile defined in uwsginl_profiles."
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
87 exit 1
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
88 fi
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
89 eval uwsginl_socket=\${uwsginl_${profile}_socket:-"/tmp/${name}-${profile}.sock"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
90 eval uwsginl_socket_mode=\${uwsginl_${profile}_socket_mode:-${uwsginl_socket_mode}}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
91 eval uwsginl_socket_owner=\${uwsginl_${profile}_socket_owner:-${uwsginl_socket_owner}}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
92 eval uwsginl_logfile=\${uwsginl_${profile}_logfile:-"/var/log/${name}-${profile}.log"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
93 eval uwsginl_pidfile=\${uwsginl_${profile}_pidfile:-"/var/run/${name}-${profile}.pid"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
94 eval uwsginl_uid=\${uwsginl_${profile}_uid:-"${uwsginl_uid}"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
95 eval uwsginl_gid=\${uwsginl_${profile}_gid:-"${uwsginl_uid}"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
96 eval uwsginl_flags=\${uwsginl_${profile}_flags:-"${uwsginl_flags}"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
97 eval uwsginl_procname=\${uwsginl_${profile}_procname:-"${uwsginl_procname}"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
98 eval uwsginl_emperor=\${uwsginl_${profile}_emperor:-"${uwsginl_emperor}"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
99 eval uwsginl_vassals_dir=\${uwsginl_${profile}_vassals_dir:-"${uwsginl_vassals_dir}"}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
100 eval uwsginl_configfile=\${uwsginl_${profile}_configfile:-"${uwsginl_configfile}"}
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
101 elif [ -n "$1" ]; then
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
102 for profile in ${uwsginl_profiles}; do
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
103 echo "Processing ${name} profile: ${profile}"
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
104 %%PREFIX%%/etc/rc.d/uwsginl $1 ${profile}
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
105 done
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
106 exit 0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
107 fi
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
108 fi
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
109
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
110 pidfile=${uwsginl_pidfile}
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
111 start_precmd=start_precmd
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
112 stop_postcmd=stop_postcmd
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
113 reload_precmd=reload_precmd
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
114 brutalreload_cmd=brutalreload_cmd
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
115 sig_stop="INT"
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
116 extra_commands="reload brutalreload"
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
117 procname=${uwsginl_procname}
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
118
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
119 start_precmd()
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
120 {
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
121 rc_flags=""
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
122 if [ -e ${uwsginl_configfile} ]; then
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
123 rc_flags="--ini ${uwsginl_configfile} "
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
124 fi
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
125
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
126 if checkyesno uwsginl_emperor; then
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
127 echo "Running uWSGI as Emperor. Vassals loaded from "$uwsginl_vassals_dir
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
128 required_dirs=${uwsginl_vassals_dir}
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
129 rc_flags=${rc_flags}"--emperor-pidfile ${uwsginl_pidfile} -d ${uwsginl_logfile} --emperor ${uwsginl_vassals_dir}"
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
130 rc_flags=${rc_flags}" --vassals-set uid=${uwsginl_uid} --vassals-set gid=${uwsginl_gid}"
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
131 rc_flags=${rc_flags}" --vassals-set chmod-socket=${uwsginl_socket_mode} --vassals-set chown-socket=${uwsginl_socket_owner}"
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
132 else
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
133 rc_flags=${rc_flags}"--master --uid ${uwsginl_uid} --gid ${uwsginl_gid} --pidfile ${uwsginl_pidfile} -d ${uwsginl_logfile}"
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
134 rc_flags=${rc_flags}" -s ${uwsginl_socket} --chmod-socket=${uwsginl_socket_mode} --chown-socket=${uwsginl_socket_owner}"
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
135 fi
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
136
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
137 rc_flags=${rc_flags}" ${uwsginl_flags}"
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
138 }
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
139
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
140 stop_postcmd()
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
141 {
2
003d10e103ef A new port named www/uwsginl which is www/uwsi with the "nolang" profile and some additional embedded plugins.
Franz Glasner <hg@dom66.de>
parents: 0
diff changeset
142 rm -f ${uwsginl_pidfile} ${uwsginl_socket}
0
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
143 }
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
144
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
145 reload_precmd()
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
146 {
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
147 echo "Gracefully reloading ${name} without closing the main sockets."
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
148 }
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
149
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
150 brutalreload_cmd()
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
151 {
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
152 echo "Reloading ${name} without closing the main sockets."
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
153
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
154 reload_precmd=""
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
155 sig_reload="TERM"
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
156 run_rc_command ${rc_prefix}reload $rc_extra_args || return 1
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
157 }
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
158
748e69c58ee3 Added the FreeBSD port www/uwsgi as of 2017-09-13 as origin port
Franz Glasner <hg@dom66.de>
parents:
diff changeset
159 run_rc_command "$1"