This repository was archived by the owner on Oct 3, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +38
-12
lines changed
Expand file tree Collapse file tree 5 files changed +38
-12
lines changed Original file line number Diff line number Diff line change 11# Process this file with autoconf to produce a configure script.
22
3- AC_INIT ( iipsrv ,1.3.2 )
3+ AC_INIT ( iipsrv ,1.4.0 )
44AC_CONFIG_MACRO_DIR ( [ m4] )
55AM_INIT_AUTOMAKE
66
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ FROM ${FROM_NAMESPACE}/base:$FROM_VERSION
2020
2121RUN apt-get -y update && \
2222 apt-get install -y \
23+ cron \
2324 git \
2425 libjpeg8-dev \
2526 libmemcached-dev \
@@ -30,6 +31,7 @@ RUN apt-get -y update && \
3031 psmisc \
3132 autoconf \
3233 libtool \
34+ rsyslog \
3335 spawn-fcgi \
3436 software-properties-common && \
3537 apt-get -y build-dep openslide && \
@@ -71,6 +73,12 @@ RUN cd /opt/iipsrv && \
7173COPY deploy.sh /tmp/deploy.sh
7274RUN chmod +x /tmp/deploy.sh
7375
76+ COPY start-iip.sh /tmp/start-iip.sh
77+ RUN chmod +x /tmp/start-iip.sh
78+
79+ COPY check-status.sh /tmp/check-status.sh
80+ RUN chmod +x /tmp/check-status.sh
81+
7482RUN ldconfig -v
7583
7684ENTRYPOINT ["/tmp/deploy.sh" ]
Original file line number Diff line number Diff line change 1+ . /tmp/iip-configuration.sh
2+
3+ COUNT=$( ps aux | grep /opt/iipsrv/src/iipsrv.fcgi | grep -v grep | wc -l)
4+ if [ $COUNT -lt $NB_IIP_PROCESS ]; then
5+ echo " $COUNT / $NB_IIP_PROCESS on $( date) "
6+ killall -9 /opt/iipsrv/src/iipsrv.fcgi
7+ /tmp/start-iip.sh
8+ fi ;
Original file line number Diff line number Diff line change @@ -26,13 +26,9 @@ echo " create 640 root root" >> /etc/logrotate.d/iip
2626echo " su root root" >> /etc/logrotate.d/iip
2727echo " }" >> /etc/logrotate.d/iip
2828
29- # IIP configuration options
30- export VERBOSITY=10
31- export LOGFILE=/tmp/iip.out
3229. /tmp/iip-configuration.sh
3330sysctl -w net.core.somaxconn=2048
3431
35- env
3632
3733# Configure Nginx
3834PORT=9000
@@ -46,12 +42,15 @@ mv /tmp/nginx.conf.sample /usr/local/nginx/conf/nginx.conf
4642echo " start nginx"
4743/usr/local/nginx/sbin/nginx &
4844
49- # Spawn FCGI processes
50- COUNTER=0
51- while [ $COUNTER -lt $NB_IIP_PROCESS ]; do
52- echo " spawn process"
53- spawn-fcgi -f /opt/iipsrv/src/iipsrv.fcgi -a 127.0.0.1 -p $(( $PORT + $COUNTER ))
54- let COUNTER=COUNTER+1
55- done
45+ /tmp/start-iip.sh
46+
47+ touch /tmp/crontab
48+ echo " NB_IIP_PROCESS=$NB_IIP_PROCESS " >> /tmp/crontab
49+ echo " */1 * * * * /bin/bash /tmp/check-status.sh >> /tmp/cron.out" >> /tmp/crontab
50+ crontab /tmp/crontab
51+ rm /tmp/crontab
52+
53+ service rsyslog restart
54+ service cron restart
5655
5756tail -F /tmp/iip.out
Original file line number Diff line number Diff line change 1+ export VERBOSITY=10
2+ export LOGFILE=/tmp/iip.out
3+ . /tmp/iip-configuration.sh
4+
5+ PORT=9000
6+ COUNTER=0
7+ while [ $COUNTER -lt $NB_IIP_PROCESS ]; do
8+ echo " spawn process"
9+ spawn-fcgi -f /opt/iipsrv/src/iipsrv.fcgi -a 127.0.0.1 -p $(( $PORT + $COUNTER ))
10+ let COUNTER=COUNTER+1
11+ done
You can’t perform that action at this time.
0 commit comments