918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Line | |
---|
1 | #!/bin/bash |
---|
2 | # Desinstalación de OpenGnSys. |
---|
3 | |
---|
4 | |
---|
5 | # Parar servicio. |
---|
6 | echo "Uninstalling OpenGnSys services." |
---|
7 | if [ -x /etc/init.d/opengnsys ]; then |
---|
8 | /etc/init.d/opengnsys stop |
---|
9 | update-rc.d -f opengnsys remove |
---|
10 | fi |
---|
11 | # Eliminar bases de datos. |
---|
12 | echo "Erasing OpenGnSys database." |
---|
13 | MYSQLROOT="passwordroot" |
---|
14 | DROP=1 |
---|
15 | if ! mysql -u root -p"$MYSQLROOT" <<<"quit" 2>/dev/null; then |
---|
16 | stty -echo |
---|
17 | read -p "- Please, insert MySQL root password: " MYSQLROOT |
---|
18 | echo "" |
---|
19 | stty echo |
---|
20 | if ! mysql -u root -p"$MYSQLROOT" <<<"quit" 2>/dev/null; then |
---|
21 | DROP=0 |
---|
22 | echo "Warning: database not erased." |
---|
23 | fi |
---|
24 | fi |
---|
25 | if test $DROP; then |
---|
26 | mysql -u root -p"$MYSQLROOT" <<<"DROP DATABASE ogBDAdmin;" 2>/dev/null |
---|
27 | mysql -u root -p"$MYSQLROOT" <<<"DROP DATABASE ogAdmBD;" 2>/dev/null |
---|
28 | mysql -u root -p"$MYSQLROOT" <<<"DROP USER usuog;" 2>/dev/null |
---|
29 | fi |
---|
30 | # Eliminar ficheros. |
---|
31 | echo "Deleting OpenGnSys files." |
---|
32 | rm -fr /opt/opengnsys |
---|
33 | rm -f /etc/init.d/opengnsys /etc/default/opengnsys |
---|
34 | echo "Post-installation tasks:" |
---|
35 | echo "- You may stop or uninstall manually all other services" |
---|
36 | echo " (DHCP, PXE, TFTP, NFS, Apache, MySQL)." |
---|
37 | |
---|
Note: See
TracBrowser
for help on using the repository browser.