Issue #3089 fixed init.d script for collaboration dataserver RPM
Former-commit-id:57f5ac701c
[formerly57f5ac701c
[formerly 9cdef44104a7453a4b968afd1f3845b1ba69ba06]] Former-commit-id:1273846844
Former-commit-id:a074b27951
This commit is contained in:
parent
58618a1842
commit
d1c9dbcc28
2 changed files with 23 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue