Add a script to delete device status entries that are older than 2 months. (#1232)
Add a script to delete device status entries that are older than 2 months. (#1232)

* Add a script to delete device status entries that are older than 2 months.

Signed-off-by: Tzachi Dar <fcd6b483c7c548a19138de6d5ed5059f11647f8c@gmail.com>

* Fixes to delete old device status:
1) Create a local backup of the data.
2) Add number of days to delete as a parameter.
3) Add a nightly mode (parameters are given as enviorment variables).

* Write the backedup records in one line.

* New implmentation:
Delete all entries in one command.

* Fix enviorment variable for nightly mode.
openaps/oref0,openaps/oref0,openaps/oref0,openaps/oref0