浏览代码

Clear pasted content every 24 hours

Bob Mottram 11 年前
父节点
当前提交
2276f78795
共有 1 个文件被更改,包括 30 次插入0 次删除
  1. 30
    0
      beaglebone.txt

+ 30
- 0
beaglebone.txt 查看文件

6754
 #+BEGIN_SRC: bash
6754
 #+BEGIN_SRC: bash
6755
 chmod +x /usr/bin/zerobinupdate
6755
 chmod +x /usr/bin/zerobinupdate
6756
 echo "*/5            * *   *   *   root /usr/bin/timeout 120 /usr/bin/zerobinupdate" >> /etc/crontab
6756
 echo "*/5            * *   *   *   root /usr/bin/timeout 120 /usr/bin/zerobinupdate" >> /etc/crontab
6757
+#+END_SRC
6758
+
6759
+Additionally to ensure that the service is being used as intended and not as a permanent data store:
6760
+
6761
+#+BEGIN_SRC: bash
6762
+editor /usr/bin/zerobinclear
6763
+#+END_SRC
6764
+
6765
+Add the following:
6766
+
6767
+#+BEGIN_SRC: bash
6768
+#!/bin/bash
6769
+
6770
+CONTENT=/usr/local/lib/python2.7/dist-packages/zerobin-0.4.1-py2.7.egg/zerobin/static/content
6771
+
6772
+# Exit if there is no content directory
6773
+if [[ ! -d $CONTENT ]]; then
6774
+	exit
6775
+fi
6776
+
6777
+rm -rf $CONTENT
6778
+#+END_SRC
6779
+
6780
+Save and exit.
6781
+
6782
+#+BEGIN_SRC: bash
6783
+chmod +x /usr/bin/zerobinclear
6784
+echo "35             3 *   *   *   root /usr/bin/zerobinclear" >> /etc/crontab
6757
 service cron restart
6785
 service cron restart
6758
 #+END_SRC
6786
 #+END_SRC
6759
 
6787
 
6788
+This will delete all pasted content once per day.
6789
+
6760
 ** Install Tripwire
6790
 ** Install Tripwire
6761
 
6791
 
6762
 #+BEGIN_VERSE
6792
 #+BEGIN_VERSE