Git Product home page Git Product logo

fusionpbx-clean-old-data's Introduction

fusionpbx-clean-old-data

Usage

$ sudo -H -u www-data bash fusionpbx-clean-old-data.sh \
                                        --days <mininum-age-of-data> \
                                        --domains <all|comma-separated-list> \
                                        [--exclude <comma-separated-list>]
where:
        --days      is the minimum age (in days) the data must has to be cleaned
        --domains   a comma separated list of domains to be cleaned 
                    (e.g 'some.domain.com, another.domain') or the keyword 'all'
                    to select all available domains
        --exclude   can only be used when --domains is 'all' to exclude a comma 
                    separated list of domains of been cleaned

Install cron job to automatically clean old data

git clone https://github.com/guallo/fusionpbx-clean-old-data.git
cd fusionpbx-clean-old-data/

sudo cp fusionpbx-clean-old-data.sh /etc/
sudo cp fusionpbx-clean-old-data-caller /etc/cron.daily/

sudo chown root:root /etc/fusionpbx-clean-old-data.sh /etc/cron.daily/fusionpbx-clean-old-data-caller
sudo chmod 755 /etc/fusionpbx-clean-old-data.sh /etc/cron.daily/fusionpbx-clean-old-data-caller

cd ..
rm -rf fusionpbx-clean-old-data/

sudo nano /etc/cron.daily/fusionpbx-clean-old-data-caller  # Edit as needed.

Uninstall cron job

sudo rm -f /etc/fusionpbx-clean-old-data.sh /etc/cron.daily/fusionpbx-clean-old-data-caller

Disable the original fusionpbx-maintenance cron-script

sudo chmod -x /etc/cron.daily/fusionpbx-maintenance

Enable the original fusionpbx-maintenance cron-script

sudo chmod +x /etc/cron.daily/fusionpbx-maintenance

fusionpbx-clean-old-data's People

Contributors

guallo avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.