diff options
author | M S Vishwanath Bhat <vishwanath@gluster.com> | 2012-01-12 23:30:00 +0530 |
---|---|---|
committer | M S Vishwanath Bhat <vishwanath@gluster.com> | 2012-01-12 23:35:15 +0530 |
commit | f40ffd8028d3dd4f3eef4a3409c531af941d23f0 (patch) | |
tree | c2bcf865c0623761b01ca5929d8caa3c78d527bf /helper_scrips/clean_logs.sh | |
parent | 254e67dbd7a35d38dbe7a5f525955adeb86f5939 (diff) |
renaming helper_scrips->helper_scripts and cleaning up the whitespaces
Change-Id: I6004e4066fab30e14716ef6475c1281270974d2b
Signed-off-by: M S Vishwanath Bhat <vishwanath@gluster.com>
Diffstat (limited to 'helper_scrips/clean_logs.sh')
-rwxr-xr-x | helper_scrips/clean_logs.sh | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/helper_scrips/clean_logs.sh b/helper_scrips/clean_logs.sh deleted file mode 100755 index 7d30bd9..0000000 --- a/helper_scrips/clean_logs.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash - -function _init () -{ - set -u; -} - -function clean_logs () -{ - local remote_server=; - - if [ $# -eq 1 ]; then - remote_server=$1; - fi - - if [ $remote_server ]; then - ssh $remote_server rm -rf /usr/local/var/log/glusterfs/*.log; - ssh $remote_server rm -rf /usr/local/var/log/glusterfs/bricks/*; - return 0; - fi - - for i in $(cat /root/servers) - do - clean_logs $i; - done - -} - -function clean_my_logs () -{ - rm -rf /usr/local/var/log/glusterfs/*.log; - rm -rf /usr/local/var/log/glusterfs/bricks/*; - - return 0; -} - -function main () -{ - stat --printf=%i /root/servers 2>/dev/null 1>/dev/null; - if [ $? -ne 0 ]; then - echo "servers file is not present /root. Cannot execute further."; - - exit 1; - fi - - clean_my_logs; - clean_logs; - - return 0; -} - -_init && main "$@" - - |