Merge "Issue #3089 fixed init.d script for collaboration dataserver RPM" into omaha_14.3.1

Former-commit-id: 2994753636 [formerly 1e48076fb2] [formerly 2994753636 [formerly 1e48076fb2] [formerly 58eaf444bd [formerly b4c0a78c01c9048ccac6fcd098d274380159fd0c]]]
Former-commit-id: 58eaf444bd
Former-commit-id: 9f6eff005b [formerly e1d91769fe]
Former-commit-id: 733b64a851
This commit is contained in:
Greg Armendariz 2014-04-30 19:34:43 -05:00 committed by Gerrit Code Review
commit 4066e1c518
2 changed files with 23 additions and 2 deletions

View file

@ -45,6 +45,8 @@ if [ $? -ne 0 ]; then
fi
%install
dataserver_project="%{_baseline_workspace}/rpms/awips2.core/Installer.collab-dataserver"
config_directory="${dataserver_project}/configuration"
cd %{_baseline_workspace}/collaboration.dataserver
export ANT_OPTS="%{_ant_opts}"
/awips2/ant/bin/ant -f build.xml deploy
@ -52,9 +54,23 @@ if [ $? -ne 0 ]; then
exit 1
fi
cp -r ${config_directory}/etc ${RPM_BUILD_ROOT}
%pre
%post
chmod ug+x /awips2/collab-dataserver/bin/*.sh
chmod 755 /etc/init.d/collab-dataserver
/sbin/chkconfig --add collab-dataserver
%preun
# Remove and unregister the collab-dataserver service.
if [ -f /etc/init.d/collab-dataserver ]; then
/sbin/chkconfig collab-dataserver off
/sbin/chkconfig --del collab-dataserver
rm -f /etc/init.d/collab-dataserver
fi
%postun
%clean
@ -82,3 +98,6 @@ rm -rf ${RPM_BUILD_ROOT}
/awips2/collab-dataserver/lib/foss/*
%dir /awips2/collab-dataserver/config
/awips2/collab-dataserver/config/*
%defattr(755,root,root,755)
/etc/init.d/collab-dataserver

View file

@ -14,7 +14,7 @@ COLLAB_BIN=/awips2/collab-dataserver/bin
PROG=`basename $0`
start() {
echo -n $"Starting HTTP Collaboration Dataserver"
echo $"Starting HTTP Collaboration Dataserver"
# start.sh script starts the service using nohup.
${COLLAB_BIN}/start.sh
return $?
@ -26,7 +26,7 @@ status() {
}
stop() {
echo -n $"Stopping HTTP Collaboration Dataserver"
echo $"Stopping HTTP Collaboration Dataserver"
${COLLAB_BIN}/stop.sh
return
}
@ -50,8 +50,10 @@ case "$1" in
start
RETVAL=$?
;;
*)
echo $"Usage: $PROG {start|stop|restart|status}"
exit 1
;;
esac
exit $RETVAL