sadm_server_housekeeping.sh

Updated: 2018/11/29
O/S : Aix, Linux, MacOS

 
NAME

sadm_server_housekeeping.sh   -   Make sure all the server files in $SADMIN have proper owner, group and permission.

 
SYNOPSIS

sadm_server_housekeeping.sh     [ -v -h  ]    [ -d   0-9  ]   

 
DESCRIPTION
  • Make sure all the server files in $SADMIN have proper owner, group and permission.
  • 
        $ sudo sadm_server_housekeeping.sh
        ================================================================================
        Starting sadm_server_housekeeping.sh V2.3 - SADM Lib. V2.52
        Server Name: holmes.maison.ca - Type: LINUX
        CENTOS 7.5.1804 Kernel 3.10.0-862.14.4.el7.x86_64
        ==================================================
        
        Server Directories HouseKeeping.
        find /sadmin/www -type d -exec chmod -R 775 {} \; 
        find /sadmin/www -exec chown -R apache:apache {} \;
        
        Server Files HouseKeeping.
        find /sadmin/www/images -type f -exec chmod 664 {} \;
        find /sadmin/www -type f -name *.php -exec chmod 664 {} \;
        find /sadmin/www -type f -name *.css -exec chmod 664 {} \;
        find /sadmin/www -type f -name *.js -exec chmod 664 {} \;
        find /sadmin/www -type f -name *.rrd -exec chmod 664 {} \;
        find /sadmin/www -type f -name *.txt -exec chmod 664 {} \;
        find /sadmin/www/dat -type f -exec chmod 664 {} \;
            
        ----------
        Find any *.png files older than 5 days in /sadmin/www/tmp/perf and delete them.
        List of files that will be remove.
    
        ==================================================
        Script return code is 0
        Script execution time is 00:00:03
        Trim History /sadmin/dat/rch/holmes_sadm_server_housekeeping.rch to 125 lines
        Requested alert only if script fail (Won't send alert)
        Trim log /sadmin/log/holmes_sadm_server_housekeeping.log to 2000 lines
        Thu Nov 29 13:33:32 EST 2018 - End of sadm_server_housekeeping.sh
        ================================================================================
        

 
OPTIONS

-d
Specify debug level (0-9).
Value of 0 indicate that no debug information is to be displayed.
-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
sadm_server_sunrise.sh   (This is the script that execute the server housekeeping every morning)
sadm_client_housekeeping.sh   (Same king of script as this one, but for the SADMIN client)


 
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