summaryrefslogtreecommitdiffstats
path: root/installer/opengnsys_uninstall.sh
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2011-12-22 13:38:11 +0000
committerramon <ramongomez@us.es>2011-12-22 13:38:11 +0000
commitc3c7cb3ae6f6600223111a572050f34f2df6fa71 (patch)
tree96fce1db6bf64fee2845d3a48abcbe07d9937562 /installer/opengnsys_uninstall.sh
parent4caea352de0d0a19d4e0a2e2dd04980dd28e6be0 (diff)
Congelar versión 1.0.2 en tags/opengnsys-1.0.2 (modifica #446).opengnsys-1.0.2
git-svn-id: https://opengnsys.es/svn/tags/opengnsys-1.0.2@2405 a21b9725-9963-47de-94b9-378ad31fedc9
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"