gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnumed-devel] Mac OS easy install and ./redo-public.sh


From: Dominique Buenzli
Subject: [Gnumed-devel] Mac OS easy install and ./redo-public.sh
Date: Tue, 15 Jun 2004 22:22:26 +0200

Hello !

I am actually trying to make an Mac OS easy gnumed install (with the invaluable help of my brother Daniel).

Shortly described, this will include one double-clickable application "GnumedLauncher.app" (includes gnumed) and two scripts.
One of the script is to launch the database. The other one is to configure the postgresql server.

Status:
- Gnumedlauncher.app: done and works
- launch/stop database script: done and works
- configure postgresql script: done but doesn't work as I wish :-(

Configure postgresql script contains the following commands:

<x-tad-smaller>sudo chown -R postgres /usr/local/pgsql/
sudo -u postgres /usr/local/bin/initdb -D /usr/local/pgsql/data
cd ../GnumedLauncher.app/Contents/MacOS/gnumed/gnumed/server/bootstrap
./redo-public.sh</x-tad-smaller>


The problem is the ./redo-public.sh script. I wish that the user doesn't has to enter the four yes and the four postgres password in the terminal when using the redo-public.sh shell script.

Note that the launch/stop database script is a little bit dirty, e.g. it assumes that pg_ctl resides at /usr/local/bin/pg_ctl and that the datadir is at /usr/local/pgsql/data etc. Though this could be enhanced in the
script itself, maybe the best would be to have a small python gui just to start/stop/initalize the db and specify file paths. I could then just put an applescript on top of it (as I have done with the gnumed client) to launch this small gui. This would also solve my problem with the redo-public script (this small python gui could ask for the db password and launch the initializing script).
Just a suggestion...

What do you think about that ?
What will you suggest ?

Thanks in advance.

P.S.
If you need some more details, here are some notes about this project...


Gnumed Mac OS easy installer project

The goal is to ease the process of installing gnumed on Mac OS X 10.3 (Panther).

It has been decided that the user has to create a postgres user himself (needed to use postgreSQL) and that the postgreSQL database will still have to be installed separately as it can be used for other applications than gnumed.

The user has to create a new user named postgres using the Blue Apple --> System Preferences --> Users pane.

To install postgres database server, the user will have to download and install the Mac OS package found here http://www2.entropy.ch/download/pgsql-7.4.2.pkg.tar.gz

Project

The project consists of creating a double-clickable application (GnumedLauncher.app) and scripts to configure/start the postgresql server.
The GnumedLauncher application will be a applescript application bundle. The scripts will be executable applescripts.

You can find more information about applescript here:
http://www.apple.com/applescript/

The application and scripts will be distributed as a disk-image according to Apple's way of distributing softwares.

For more information about software distribution/packaging for Mac OS X see
http://developer.apple.com/documentation/DeveloperTools/Conceptual/SoftwareDistribution/index.html

Contents of the Gnumed disk image

A) GnumedLauncher.app contains the following applications:
- wxPython
- Python add-ons (eGenix-mxbase and pyPgSQL)
- the latest stable version of gnumed
- the gnumedlauncher script used to launch the application and locate wxPython, add ons and original gnumed folder

The user will only see a GnumedLauncher.app file on which he has to double-click.

Status: done


B) The GnumedLauncher.app will be distributed with two double-clickable applescripts which include the necessary commands to configure and start the postgresql database.

1) prepare database script: which will configure postgresql to work with gnumed
sudo chown -R postgres /usr/local/pgsql/
sudo -u postgres /usr/local/bin/initdb -D /usr/local/pgsql/data
cd ../GnumedLauncher.app/Contents/MacOS/gnumed/gnumed/server/bootstrap
./redo-public.sh

Status: nearly done

2) PostgreSQL Launch script: will start/or ask to stop the postgresql database. Starting the database is required for gnumed.

Status: done

C) Documentation in html format
Status: done

D) Licenses of wxPython, eGenix and pyPgSQL
Status: done




reply via email to

[Prev in Thread] Current Thread [Next in Thread]