Commit af90ddbb authored by Philippe Gauron's avatar Philippe Gauron
Browse files

m-à-j du script de désinstallation

parent 7cf10af1
......@@ -3,30 +3,42 @@
# stop at first error
set -e
## test desinstallation
sudo apt install --assume-yes kdiff3 debconf-utils
## Remove software in reverse order of installation
## Removing of ARCHIVING installation packages
sudo apt purge --assume-yes unzip
sudo rm -rf /opt/ArchivingRoot
sudo rm -rf /etc/tangorc
if [ -h /etc/bashrc ]
then
sudo rm -f /etc/bash.bashrc
fi
sudo rm -rf /var/archivage
## préparation test desinstallation
apt install --assume-yes kdiff3 debconf-utils
## yat & yat4tango libraries
sudo apt purge --assume-yes subversion pkg-config cmake
sudo rm -f /var/www/phpmyadmin
## libtango-java
sudo apt purge --assume-yes libtango-java
### Preparation of uninstallation tools ###
DEBIAN_FRONTEND=noninteractive
REPO_DIR=$(pwd)/$(dirname $0)
echo "REPO_DIR=${REPO_DIR}"
## Removing of TANGO installation packages
apt purge --assume-yes libtango-java
rm -rf /usr/lib/yat /usr/lib/yat4tango
rm /usr/lib/libyat.so /usr/lib/libyat.so.* /usr/lib/libyat4tango.so /usr/lib/libyat4tango.so.*
apt purge --assume-yes subversion pkg-config cmake
pip uninstall -y hg-git dulwich
## GUI packages
apt purge --assume-yes python-qt4 qt4-designer pyqt4-dev-tools python-pytango python-qtpy python-qwt5-qt4 python-guiqwt python-pymca5 python-ply spyder python-lxml
## Development packages
apt purge --assume-yes gcc g++ make xemacs21 man python-pip
## TANGO packages
#configurer dbconfig-common pour supprimer la BD et révoquer les droits
apt purge --assume-yes tango-common tango-starter tango-test libtango-doc libtango-dev liblog4j1.2-java
# supprimer "source /etc/tangorc" de /etc/bash.bashrc'
sed -i -e "/tangorc/d" /etc/bash.bashrc
# supprimer export TANGO_HOST" de /etc/bash.bashrc'
sed -i -e "/TANGO_HOST/d" /etc/bash.bashrc
### Installation of Oracle Java
rm -rf /opt/java
## Hggit
sudo pip uninstall -y dulwich
###### TODO : uninstall hg-git
......@@ -44,26 +56,58 @@ echo 'dbconfig-common dbconfig-common/dbconfig-remove boolean true' | sudo debco
#### défaire la configuration de la base de données de tango-db avec dbconfig-common
#### supprimer la base de données pour tango-db
sudo apt purge --assume-yes tango-common tango-starter tango-test python-pytango libtango-doc libtango-dev liblog4j1.2-java
### Oracle 8
echo PURGE | sudo debconf-communicate oracle-java8-set-default
sudo apt purge --assume-yes oracle-java8-installer oracle-java8-set-default #libxrender1 libxtst6
### Définit les binaires java vers openjdk
update-alternatives --remove java /opt/java/jdk1.8.0_212/bin/java
#update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1
update-alternatives --remove javac /opt/java/jdk1.8.0_212/bin/javac
#update-alternatives --install /usr/bin/java javac /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/javac 1
## Supprime installation java de /opt
rm -rf /opt/java/
## Removing of CLIENT installation packages
apt-get remove --assume-yes libx32gcc-6-dev libgl1-mesa-dev:i386 libxinerama1:i386 ntpdate ntp rdesktop
rm -rf /opt/pylon*
## Removing of TANGODB installation packages
## Removing of ARCHIVING installation packages
sudo service mysql stop
# supprimer "${SUDO_USER}" de /etc/cron.allow'
# supprimer "0 2 * * * ${REPO_DIR}/archive1/delete_unmodified_since.sh > ${ARCHIVING_DIR}/hdbtdb_delete_data_and_diary_files.log" du fichier "/var/spool/cron/crontabs/${USERNAME}"
apt purge --assume-yes unzip
rm -rf /opt/ArchivingRoot
rm -rf /etc/tangorc
if [ -L /etc/bashrc ]
then
rm -f /etc/bash.bashrc
fi
rm -rf /var/archivage
## Removing of TANGO_DB installation packages
sudo apt purge --assume-yes tango-db
## Removing DATABASE installation packages
#echo 'phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2' | sudo debconf-set-selections
echo PURGE | sudo debconf-communicate phpmyadmin
sudo service mysql stop
sudo apt purge --assume-yes phpmyadmin
echo PURGE | sudo debconf-communicate mariadb-client
echo PURGE | sudo debconf-communicate mariadb-server
sudo apt purge --assume-yes mariadb-client mariadb-server expect
sudo apt purge --assume-yes "mysql*"
sudo rm -rf /etc/mysql/ y
## Removing VIRTUALBOX installation packages
sudo apt purge --assume-yes modules-assistant build-essential
# PHPMyadmin
apt purge --assume-yes phpmyadmin
echo PURGE | debconf-communicate phpmyadmin
# MariaDB
service mysql stop
echo PURGE | debconf-communicate mariadb-client
echo PURGE | debconf-communicate mariadb-server
apt purge --assume-yes mariadb-client mariadb-server
rm -rf /etc/mysql/
rm -f /var/www/phpmyadmin
## Removing common tools for all installations
sudo apt purge --assume-yes host mercurial python-pip
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment