Clear pasted content every 24 hours
This commit is contained in:
parent
432484551e
commit
2276f78795
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue