$pgservice start
}
+psql_stopdb(){
+ # Fedora9 (an maybe newer) requires running initdb
+ if [ "$pgservice" = '/etc/init.d/postgresql' ]
+ then
+ if [ ! -d /var/lib/pgsql/data/base ]
+ then
+ service postgresql initdb #&>/dev/null
+ fi
+ fi
+
+ # Might fail if it's already running, so we'll ingnore the result
+ $pgservice stop
+}
+
get_config(){
if [ ! -d "$fusionforge_src_dir" ]
then
then
echo "Forge database name not found"
find_psql_init
- $pgservice stop
- $pgservice start
+ psql_stopdb
+ psql_startdb
else
find_psql_init
- $pgservice stop
+ psql_stopdb
sleep 5
- $pgservice start
+ psql_startdb
sleep 5
echo "Droping database $database"
su - postgres -c "dropdb -e $database"
install3_db_redhat()
{
+ export dboption="--template=template0"
install3_db
}