[mapguide-users] Starting MapGuide Open Source 2.2 automatically on Ubuntu 9.10

everling tceverling at yahoo.co.uk
Wed Jun 8 05:42:10 EDT 2011


Hello all,

Using the provided mginstallubuntu.sh and adapting the information available
in "http://wiki.osgeo.org/wiki/Building_Mapguide_on_Ubuntu_7.10_Server", is
the following startup script good for production use? And is the only way to
stop the MapGuide service is by killing it?

Thank you for your time.




#   Add Apache's control script into the system init structure.

sudo ln -s
/usr/local/mapguideopensource-2.2.0/webserverextensions/apache2/bin/apachectl
/etc/init.d/apache-mapguide
sudo update-rc.d apache-mapguide defaults 30 70


#   Create a startup script for Mapguide server.

sudo touch /usr/local/mapguideopensource-2.2.0/server/bin/mapguidectl
sudo chmod u=rwx,go=r
/usr/local/mapguideopensource-2.2.0/server/bin/mapguidectl
sudo nano /usr/local/mapguideopensource-2.2.0/server/bin/mapguidectl


#   Copy the following into the new file.

#!/bin/sh
# MapGuide init script
. /lib/lsb/init-functions
case "$1" in
 start)
   log_daemon_msg "Starting MapGuide Open Source Server 2.2.0..."
   pushd /usr/local/mapguideopensource-2.2.0/server/bin> /dev/null
   ./mgserverd.sh > /dev/null
   popd > /dev/null
   log_end_msg 0
   ;;
 stop)
   log_daemon_msg "Stopping MapGuide Open Source Server 2.2.0..."
   MGPROCESS=`/usr/bin/pgrep -f -u root "mgserver daemon"`
   if [ "$MGPROCESS" != "" ]
   then
     /bin/kill $MGPROCESS
   fi
   log_end_msg 0
   ;;
 *)
   echo "Usage: $0 {start|stop}"
   exit 1
   ;;
esac
exit 0


#   Add MapGuide's control script into the system init structure.

sudo ln -s /usr/local/mapguideopensource-2.2.0/server/bin/mapguidectl
/etc/init.d/mapguide
sudo update-rc.d mapguide defaults 35 65


--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Starting-MapGuide-Open-Source-2-2-automatically-on-Ubuntu-9-10-tp6452977p6452977.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list