sadm_uninstall.sh

Updated: 2019/04/05
O/S : Aix, Linux, MacOS

 
NAME

sadm_uninstall.sh   -   Uninstall the SADMIN tools.

 
SYNOPSIS

sadm_uninstall.sh     [ -v -h -y  ]    [ -d   0-9  ]   

 
DESCRIPTION
  • Uninstall the SADMIN tools.
  • For security reason, when you run the uninstall script, it will run in 'dry run' mode.
    This means that it will not change or remove anything.
    But it will show you what it would do when you really uninstall SADMIN.
  • To really uninstall the SADMIN tools, use the '-y' command line option.
  • Be aware that the SADMIN database will be deleted (drop) when uninstalling a SADMIN server installation.
    The database users 'sadmin' and 'squery' will also be deleted.

Example when running in 'dry run' mode.
 
    # sadm_uninstall.sh
    ================================================================================
    Starting sadm_uninstall.sh V1.8 - SADM Lib. V2.69
    Server Name: raspi2.maison.ca - Type: LINUX
    RASPBIAN 9.8 Kernel 4.14.98+
    ==================================================
    
    Dry Run activated
    Use '-y' to really remove 'SADMIN' from this system

    Uninstalling a SADMIN client.
    Removing client crontab file /etc/cron.d/sadm_client ...
    Removing profile script /etc/profile.d/sadmin.sh ...
    Removing 'sadmin' user sudo file /etc/sudoers.d/033_sadmin-nopasswd ...
    Removing sadmin user 'sadmin' ...
    Removing sadmin group 'sadmin' ...
    Removing 'SADMIN' line in /etc/environment ...
    Removing directory structure /opt/sadmin ...
    Uninstall of SADMIN client completed.

    ==================================================
    Script return code is 0
    Script execution time is 00:00:58
    Trim History /opt/sadmin/dat/rch/raspi2_sadm_uninstall.rch to 125 lines
    Requested alert only if script fail (Won't send alert)
    Trim log /opt/sadmin/log/raspi2_sadm_uninstall.log to 1000 lines
    Sun Apr 21 05:38:16 EDT 2019 - End of sadm_uninstall.sh
    ================================================================================
    #

Example when uninstalling the SADMIN client.
 
    # sadm_uninstall.sh -y
    ================================================================================
    Starting sadm_uninstall.sh V1.3 - SADM Lib. V2.68
    Server Name: raspi5.maison.ca - Type: LINUX
    RASPBIAN 9.8 Kernel 4.14.79-v7+
    ==================================================
    
    This will remove 'SADMIN' from this system, Are you sure [y,n] ? y

    Uninstalling a SADMIN client.
    Removing client crontab file /etc/cron.d/sadm_client ...
    Removing profile script /etc/profile.d/sadmin.sh ...
    Removing 'sadmin' user sudo file /etc/sudoers.d/033_sadmin-nopasswd ...
    Removing sadmin user 'sadmin' ...
    Removing 'SADMIN' line in /etc/environment ...
    Removing directory structure /opt/sadmin ...
    Uninstall of SADMIN client completed.
    #

Example when uninstalling the SADMIN Server.
 
    # sadm_uninstall.sh -y
    ================================================================================
    Starting sadm_uninstall.sh V1.8 - SADM Lib. V2.69
    Server Name: lestrade.maison.ca - Type: LINUX
    DEBIAN 9.8 Kernel 4.9.0-8-686-pae
    ==================================================
    
    This will remove 'SADMIN Server' from this system, Are you sure [y,n] ? y

    Uninstalling a SADMIN server.
    Enter MySQL root password (to delete sadmin database or 'q' to Quit) : 
    Verifying access to Database ... 
    Database access confirmed ...
    Removing client crontab file /etc/cron.d/sadm_client ...
    Removing server crontab file /etc/cron.d/sadm_server ...
    Removing profile script /etc/profile.d/sadmin.sh ...
    Removing 'sadmin' user sudo file /etc/sudoers.d/033_sadmin-nopasswd ...
    Removing sadmin user 'sadmin' ...
    Making sure database is up - Restarting it ...
    Removing database user 'squery' ...
    Removing database user 'sadmin' ...
    Dropping 'sadmin' database ...
    Removing 'SADMIN' line in /etc/hosts
    Removing 'SADMIN' line in /etc/environment ...
    Removing directory structure /opt/sadmin ...
    Uninstall of SADMIN server completed.
    /opt/sadmin# cd ..
    /opt# ls -l 
    total 0
    /opt# 
    #

 
OPTIONS

-d
Specify debug level (0-9).
Value of 0 indicate that no debug information is to be displayed.
-y
Really uninstall the SADMIN tools from the system.
-h
Display this help and exit.
-v
Output version information and exit.



REQUIREMENTS
 
EXIT STATUS
[0]    An exit status of zero indicates success
[1]    Failure is indicated by a nonzero value, typically ‘1’.

 
AUTHOR
Jacques Duplessis (jacques.duplessis@sadmin.ca.).
Any suggestions or bug report can be sent at http://www.sadmin.ca/support.php

 
COPYRIGHT
Copyright © 2018 Free Software Foundation, Inc. License GPLv3+:
    - GNU GPL version 3 or later http://gnu.org/licenses/gpl.html.
This is free software, you are free to change and redistribute it.
There is NO WARRANTY to the extent permitted by law.

 
SEE ALSO
sadmlib_std_demo.sh    - Show with examples all global variables and functions you can use within your shell script.
sadmlib_std_demo.py    - Show with examples all global variables and functions/modules you can use within your Python script.


 
INDEX
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
REQUIREMENTS
EXIT STATUS
AUTHOR
COPYRIGHT
SEE ALSO

Copyright © 2015-2019 - www.sadmin.ca - Suggestions, Questions or Report a problem at support@sadmin.ca