#
# Copyright (c) Ensim Corporation 2000, 2001   All Rights Reserved.
#
# This software is furnished under a license and may be used and copied
# only  in  accordance  with  the  terms  of such  license and with the
# inclusion of the above copyright notice. This software or any other
# copies thereof may not be provided or otherwise made available to any
# other person. No title to and ownership of the software is hereby
# transferred.
#
# The information in this software is subject to change without notice
# and  should  not be  construed  as  a commitment by Ensim Corporation.
# Ensim assumes no responsibility for the use or  reliability  of its
# software on equipment which is not supplied by Ensim.
#
# 
pre_uninstall(){
    set_context "Uninstall $current_version"
    rh_detect

    if [ "$rhOS" = "RHEL" ]
    then
       srv_name="rhdb"
    elif [ "$rhOS" = "Fedora" ]
    then
       srv_name="postgresql"
    fi

    restore_init_script "$srv_name" "_app_init" "restart"
}

remove_srv() {
    pre_uninstall
}

upgrade_srv() {
    :
}
. /etc/appliance/scriptsLib-3.0/common.lib

G_WP_SRV_NAME=appliance

if [ "$1" = "0" ]; then
    /usr/bin/edit_svcdb -d $G_WP_SRV_NAME
    remove_srv
elif [ "$1" ]; then
    upgrade_srv
fi

script_exit_success "preun"
