ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/dbs-server.spec
(Generate patch)

Comparing COMP/CMSDIST/dbs-server.spec (file contents):
Revision 1.26 by valya, Tue Feb 5 21:16:30 2008 UTC vs.
Revision 1.33 by valya, Wed Apr 9 20:56:28 2008 UTC

# Line 1 | Line 1
1 < ### RPM cms dbs-server DBS_1_0_8
1 > ### RPM cms dbs-server DBS_1_1_2e
2  
3   %define cvstag %v
4   Source: cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e&module=DBS/Servers/JavaServer&export=DBS&tag=-r%{cvstag}&output=/dbs-server.tar.gz
# Line 15 | Line 15 | cd Servers/JavaServer
15   # fix context.xml file
16   cat > etc/context.xml << EOF_CONTEXT
17   <Context path="/servlet/DBSServlet" docBase="DBSServlet" debug="5" reloadable="true" crossContext="true">
18 <     <SupportedSchemaVersion schemaversion="DBS_1_0_8" />
19 <     <SupportedClientVersions clientversions="DBS_1_0_1, DBS_1_0_5, DBS_1_0_7, DBS_1_0_8, DBS_1_0_9"/>
18 >     <SupportedSchemaVersion schemaversion="DBS_1_0_9" />
19 >     <SupportedClientVersions clientversions="DBS_1_0_1, DBS_1_0_5, DBS_1_0_7, DBS_1_0_8, DBS_1_0_9, DBS_1_1_2"/>
20       <DBSBlockConfig maxBlockSize="2000000000000" maxBlockFiles="100" />
21                          
22       <Resource name="jdbc/dbs"
# Line 63 | Line 63 | MYSQL_ERR=\$MYSQL_PATH/error.log
63  
64   function dbs_stop()
65   {
66 <    echo $"Stop mysqld|tomcat running under `whoami` account..."
67 <    ps -w -w -f -u`whoami` | egrep "mysqld|tomcat" | grep -v egrep | awk '{print "kill -9 "\$2""}'|/bin/sh
66 >    me=\`whoami\`
67 >    echo $"Stop mysqld|tomcat running under \$me account..."
68 >    ps -w -w -f -u\$me | egrep "mysqld|tomcat" | grep -v egrep | awk '{print "kill -9 "\$2""}'|/bin/sh
69   }
70   function dbs_start()
71   {
# Line 90 | Line 91 | function dbs_status()
91         echo "MySQL server is not running"
92         exit 1
93      fi
94 <    ps -w -w -f -u`whoami` | egrep "mysqld" | grep -v egrep | awk '{print "MySQLd server running, pid="\$2""}'
95 <    ps -w -w -f -u`whoami` | egrep "tomcat" | grep -v egrep | awk '{print "Tomcat server running, pid="\$2""}'
94 >    ps -w -w -f -u\$me | egrep "mysqld" | grep -v egrep | awk '{print "MySQLd server running, pid="\$2""}'
95 >    ps -w -w -f -u\$me | egrep "tomcat" | grep -v egrep | awk '{print "Tomcat server running, pid="\$2""}'
96      echo "For more information please have a look at tomcat log:"
97      echo "\$APACHE_TOMCAT_ROOT/logs/catalina.out"
98   }
# Line 176 | Line 177 | $MYSQL_ROOT/bin/mysql --socket=$MYSQL_SO
177   # I need to copy/deploy DBS.war file into tomcat area
178   cp $DBS_SERVER_ROOT/Servers/JavaServer/DBS.war $APACHE_TOMCAT_ROOT/webapps
179  
179 echo
180 echo
181 echo "#####  IMPORTANT!!!  #####"
182 echo "For your convinience we created"
183 echo "$DBS_SERVER_ROOT/Servers/JavaServer/bin/dbs_init.sh"
184 echo "init script file which can be placed into /etc/init.d/ to allow auto-startup of DBS service"
185 echo "##### END OF README  #####"
186 echo
180   # Fix path in dbs_init.sh file since now we know install area
181   cat $DBS_SERVER_ROOT/Servers/JavaServer/bin/dbs_init.sh | sed "s,rpm_install_area,$RPM_INSTALL_PREFIX,g" > \
182      $DBS_SERVER_ROOT/Servers/JavaServer/bin/dbs_init.sh.new
183 < mv  $DBS_SERVER_ROOT/Servers/JavaServer/bin/dbs_init.sh.new $DBS_SERVER_ROOT/Servers/JavaServer/bin/dbs_init.sh
183 > /bin/mv -f $DBS_SERVER_ROOT/Servers/JavaServer/bin/dbs_init.sh.new $DBS_SERVER_ROOT/Servers/JavaServer/bin/dbs_init.sh
184 > echo "+++ Fix path in dbs_init.sh"
185   chmod a+x $DBS_SERVER_ROOT/Servers/JavaServer/bin/dbs_init.sh
186  
187   # time to start up tomcat for user
188   #$APACHE_TOMCAT_ROOT/bin/catalina.sh start
189  
190   # kill running mysql|tomcat under my account since build is over
191 < ps -w -w -f -u`whoami` | egrep "mysqld|tomcat" | grep -v egrep | awk '{print "kill -9 "$2""}' |/bin/sh
191 > echo "+++ Clean-up mysqld|tomcat processes"
192 > #ps -w -w -f -u`whoami` | egrep "mysqld|tomcat" | grep -v egrep | awk '{print "kill -9 "$2""}'
193 > #ps -w -w -f -u`whoami` | egrep "mysqld|tomcat" | grep -v egrep | awk '{print "kill -9 "$2""}' |/bin/sh
194 > killall -q mysqld
195 > killall -q tomcat
196 >
197 > echo
198 > echo
199 > echo "#####  IMPORTANT!!!  #####"
200 > echo "To work with DBS you need to source init.sh file located at"
201 > echo "$DBS_SERVER_ROOT/etc/profile.d/init.sh"
202 > echo
203 > echo "OR use init script to start|stop|status DBS services:"
204 > echo "$DBS_SERVER_ROOT/Servers/JavaServer/bin/dbs_init.sh"
205 > echo "init script file can be placed into /etc/init.d/ to allow auto-startup of DBS service"
206 > echo "##########################"
207 > echo
208 >

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines