Changeset 1119 for trunk/devel/run
- Timestamp:
- 2012-08-04T04:19:15+02:00 (10 months ago)
- File:
-
- 1 edited
-
trunk/devel/run (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/devel/run
r1113 r1119 1 1 #!/bin/bash 2 2 # this script is for developers only 3 stopfpm() { 4 if [[ -f $pidfile ]]; then 5 pid=`cat $pidfile 2>/dev/null || true` 6 if [[ $pid -gt 0 ]]; then 7 echo 8 echo Stopping fpm $pid @ $pidfile 9 kill $pid || true 10 fi 11 fi 12 } 13 3 14 set -e 4 15 MAKE=/usr/bin/make … … 93 104 esac 94 105 106 case "${args[0]}" in 107 fpm) 108 pidfile=devel.pid 109 stopfpm 110 ;; 111 stopfpm) 112 pidfile=devel.pid 113 stopfpm 114 exit 115 ;; 116 esac 117 95 118 basename=$(basename $(pwd)) 96 119 if echo $basename | grep -- - >/dev/null; then :; else … … 112 135 xcachebasename=${basename%%-*} 113 136 xcachesrcdir=../$xcachebasename 137 pidfile=../$xcachebasename/devel.pid 114 138 115 139 case "$type" in … … 192 216 ;; 193 217 fpm) 194 cmd=(./php-fpm -c devel.ini) 195 args=(-y devel.fpm) 218 echo Starting fpm ... 219 cmd=(./php-fpm -c devel.ini -y devel.fpm -g $(readlink -f $pidfile)) 220 args=() 196 221 ;; 197 222 *) … … 244 269 245 270 export XCACHE_SKIP_FCGI_WARNING=1 246 echo "${tracer[@]}" "${cmd[@]}" "${args[@]}" 247 exec "${tracer[@]}" "${cmd[@]}" "${args[@]}" 271 commandLine=("${tracer[@]}" "${cmd[@]}" "${args[@]}") 272 273 case "${cmd[0]}" in 274 *php-fpm*) 275 stopfpm 276 "${commandLine[@]}" 277 echo -n "Ctrl-C to stop" 278 trap stopfpm SIGINT SIGTERM 279 cat > /dev/null || true 280 ;; 281 *) 282 exec "${commandLine[@]}" 283 ;; 284 esac
Note: See TracChangeset
for help on using the changeset viewer.

