From 2276f78795d0401178ae6db06f3acd6ed66d8e5a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 29 Jun 2014 18:05:01 +0100 Subject: [PATCH] Clear pasted content every 24 hours --- beaglebone.txt | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/beaglebone.txt b/beaglebone.txt index 616f55e4..757e5f94 100644 --- a/beaglebone.txt +++ b/beaglebone.txt @@ -6754,9 +6754,39 @@ Save and exit. #+BEGIN_SRC: bash chmod +x /usr/bin/zerobinupdate echo "*/5 * * * * root /usr/bin/timeout 120 /usr/bin/zerobinupdate" >> /etc/crontab +#+END_SRC + +Additionally to ensure that the service is being used as intended and not as a permanent data store: + +#+BEGIN_SRC: bash +editor /usr/bin/zerobinclear +#+END_SRC + +Add the following: + +#+BEGIN_SRC: bash +#!/bin/bash + +CONTENT=/usr/local/lib/python2.7/dist-packages/zerobin-0.4.1-py2.7.egg/zerobin/static/content + +# Exit if there is no content directory +if [[ ! -d $CONTENT ]]; then + exit +fi + +rm -rf $CONTENT +#+END_SRC + +Save and exit. + +#+BEGIN_SRC: bash +chmod +x /usr/bin/zerobinclear +echo "35 3 * * * root /usr/bin/zerobinclear" >> /etc/crontab service cron restart #+END_SRC +This will delete all pasted content once per day. + ** Install Tripwire #+BEGIN_VERSE