blob: 0dbdbb6b11d1139e2a871a745451e71c8167861e (
plain) (
tree)
|
|
read_password() {
MYSQL_ROOT_PASS="$(grep MYSQL_ROOT_PASS "$CONFIGDIR/config"|cut -f 2 -d "=")" 2>/dev/null
MYSQL_ROOT_PASS_OLD="$(grep MYSQL_ROOT_PASS "$CONFIGDIR/config.prerun" | cut -f 2 -d "=")" 2>/dev/null
}
purge_install() {
echo "# Purging install (This is only to be used within development!)..."
echo "# Purging installed packages..."
uninstall_packages "$PACKAGELIST_SERVER"
uninstall_packages "$PACKAGELIST_SCRIPT"
# read_password
# echo "# Deleting mysql databases openslx and sat..."
# for db in openslx sat; do
# mysql_delete_db "$db" "$MYSQL_ROOT_PASS"
# if [ "$ERR" -ne 0 ]; then
# echo -n "# Retrying: "
# mysql_delete_db "$user" "$MYSQL_ROOT_PASS_OLD"
# if [ "$ERR" -ne 0 ]; then
# KILLALL=true
# fi
# fi
# done
#
# echo "# Deleting mysql users openslx and sat..."
# for user in openslx sat; do
# mysql_delete_user "$user" "$MYSQL_ROOT_PASS"
# if [ "$ERR" -ne 0 ]; then
# echo -n "# Retrying: "
# mysql_delete_user "$user" "$MYSQL_ROOT_PASS_OLD"
# if [ "$ERR" -ne 0 ]; then
# KILLALL=true
# fi
# fi
# done
# # Brutalinski user and database dropping:
# if [ "$KILLALL" == "true" ]; then
echo "#"
echo "# Killing databases by force."
echo "#"
rm -rf /var/lib/mysql 2>/dev/null
# fi
killall mysqld 2>/dev/null 1>&2
}
|