Changes between Version 20 and Version 21 of InstallationGuidelines/Linux/Server/CherokeePostgreSQL
- Timestamp:
- 01/27/12 22:40:50 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
InstallationGuidelines/Linux/Server/CherokeePostgreSQL
v20 v21 120 120 cd .. 121 121 122 # Configure Cherokee 122 # Configure uwsgi 123 123 124 cat << EOF > "/home/web2py/uwsgi.xml" 124 125 <uwsgi> 126 <uid>web2py</uid> 127 <gid>web2py</gid> 125 128 <pythonpath>/home/web2py/</pythonpath> 126 129 <app mountpoint="/"> … … 128 131 </app> 129 132 <workers>4</workers> 133 <pidfile>/tmp/uwsgi-prod.pid</pidfile> 134 <daemonize>/var/log/uwsgi/prod.log</daemonize> 135 <socket>127.0.0.1:59025</socket> 136 <master/> 130 137 </uwsgi> 131 138 EOF 139 140 touch /tmp/uwsgi-prod.pid 141 chown web2py: /tmp/uwsgi-prod.pid 142 143 mkdir -p /var/log/uwsgi 144 chown web2py: /var/log/uwsgi 145 146 # Init script for uwsgi 147 148 cat << EOF > "/etc/init.d/uwsgi" 149 #! /bin/bash 150 # /etc/init.d/uwsgi 151 # 152 153 daemon=/usr/local/bin/uwsgi 154 pid=/tmp/uwsgi-prod.pid 155 args="-x /home/web2py/uwsgi.xml" 156 157 # Carry out specific functions when asked to by the system 158 case "$1" in 159 start) 160 echo "Starting uwsgi" 161 start-stop-daemon -p $pid --start --exec $daemon -- $args 162 ;; 163 stop) 164 echo "Stopping script uwsgi" 165 start-stop-daemon --signal INT -p $pid --stop $daemon -- $args 166 ;; 167 reload) 168 echo "Reloading conf" 169 kill -HUP $(cat $pid) 170 ;; 171 *) 172 echo "Usage: /etc/init.d/uwsgi {start|stop|reload}" 173 exit 1 174 ;; 175 esac 176 exit 0 177 EOF 178 179 chmod a+x /etc/init.d/uwsgi 180 update-rc.d uwsgi defaults 181 182 183 # Configure Cherokee 132 184 133 185 mv "$CHEROKEE_CONF" /tmp … … 237 289 source!1!nick = uWSGI 1 238 290 source!1!timeout = 300 239 source!1!type = interpreter291 source!1!type = host 240 292 source!1!user = web2py 241 293 EOF … … 270 322 EOF 271 323 272 chown -R www-data /usr/local/var/lib/cherokee 324 273 325 /etc/init.d/cherokee restart 274 326