summaryrefslogtreecommitdiffstats
path: root/installer/opengnsys_uninstall.sh
diff options
context:
space:
mode:
Diffstat (limited to 'installer/opengnsys_uninstall.sh')
-rwxr-xr-xinstaller/opengnsys_uninstall.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/installer/opengnsys_uninstall.sh b/installer/opengnsys_uninstall.sh
index 0ee3b947..f9b5ce0e 100755
--- a/installer/opengnsys_uninstall.sh
+++ b/installer/opengnsys_uninstall.sh
@@ -11,6 +11,7 @@ DBUSER="usuog" # Usuario de acceso a la base de datos
# Variables.
OPENGNSYS="/opt/opengnsys" # Directorio de OpenGnSys
OGIMG="images" # Directorio de imágenes del repositorio
+CLIENTUSER="opengnsys" # Usuario de acceso del cliente
# Parar servicio.
echo "Uninstalling OpenGnSys services."
@@ -37,6 +38,10 @@ if test $DROP; then
mysql -u root -p"$MYSQLROOT" <<<"DROP USER '$DBUSER';" 2>/dev/null
mysql -u root -p"$MYSQLROOT" <<<"DROP USER '$DBUSER'@'localhost';" 2>/dev/null
fi
+# Quitar configuración específica de Apache.
+a2dissite opengnsys
+rm -f /etc/apache2/{sites-available,sites-enabled}/opengnsys*
+/etc/init.d/apache2 reload
# Eliminar ficheros.
echo "Deleting OpenGnSys files."
for dir in $OPENGNSYS/*; do
@@ -48,6 +53,9 @@ rm -f /etc/init.d/opengnsys /etc/default/opengnsys /var/log/opengnsys
# Comentar recursos de OpenGnSys en Samba.
perl -pi -e "s/^ *include \= \/etc\/samba\/smb-og.conf/\; include \= \/etc\/samba\/smb-og.conf/" /etc/samba/smb.conf
/etc/init.d/smbd restart
+# Eliminar usuario de OpenGnSys.
+smbpasswd -x $CLIENTUSER
+userdel $CLIENTUSER
# Tareas manuales a realizar después de desinstalar.
echo "Manual tasks:"
echo "- You may stop or uninstall manually all other services"