aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/trashman/autoupgrade/info1
-rwxr-xr-xshare/trashman/autoupgrade/unix/openbsd/install10
-rw-r--r--share/trashman/tor-relay/info1
-rwxr-xr-xshare/trashman/tor-relay/unix/openbsd/install35
4 files changed, 47 insertions, 0 deletions
diff --git a/share/trashman/autoupgrade/info b/share/trashman/autoupgrade/info
new file mode 100644
index 0000000..7883790
--- /dev/null
+++ b/share/trashman/autoupgrade/info
@@ -0,0 +1 @@
+makes your system self-update automatically
diff --git a/share/trashman/autoupgrade/unix/openbsd/install b/share/trashman/autoupgrade/unix/openbsd/install
new file mode 100755
index 0000000..219798d
--- /dev/null
+++ b/share/trashman/autoupgrade/unix/openbsd/install
@@ -0,0 +1,10 @@
+#!/usr/bin/env sh
+#
+# Automated upgrades, base system and packages.
+#
+
+# Add upgrade commands into root's crontab
+echo 5 0 * * * syspatch >> /var/cron/tabs/root
+echo 5 1 * * * pkg_check >> /var/cron/tabs/root
+echo 5 2 * * * pkg_add -u >> /var/cron/tabs/root
+echo 5 3 * * * pkg_delete -a >> /var/cron/tabs/root
diff --git a/share/trashman/tor-relay/info b/share/trashman/tor-relay/info
new file mode 100644
index 0000000..b89fc0f
--- /dev/null
+++ b/share/trashman/tor-relay/info
@@ -0,0 +1 @@
+tor daemon configured as a relay
diff --git a/share/trashman/tor-relay/unix/openbsd/install b/share/trashman/tor-relay/unix/openbsd/install
new file mode 100755
index 0000000..0455300
--- /dev/null
+++ b/share/trashman/tor-relay/unix/openbsd/install
@@ -0,0 +1,35 @@
+#!/usr/bin/env sh
+#
+# Configure a tor daemon system-wide.
+#
+
+# Firewall config
+echo set limit states = 100000 >> /etc/pf.conf
+echo pass in log on egress proto tcp from any to any port { 9001 9030 } >> /etc/pf.conf
+echo pass out log on egress proto tcp from any to any port { 9001 9030 } >> /etc/pf.conf
+
+# Apply firewall rules
+pfctl -f /etc/pf.conf
+
+# Set
+echo https://ftp.openbsd.org >> /etc/installurl
+
+# Install Tor
+pkg_add -vv tor
+
+# Configure Tor
+echo SOCKSPort 0 >> /etc/tor/torrc
+echo ORPort 9001 >> /etc/tor/torrc
+echo Nickname Baiacu >> /etc/tor/torrc
+echo Exitrelay 0 >> /etc/tor/torrc
+echo DirPort 9030 >> /etc/tor/torrc
+
+# Sysctl config
+echo kern.maxfiles=20000 >> /etc/sysctl.conf
+
+# Login config
+echo -e "tor:\/n:openfiles-max=8192:\ :tc=daemon:" >> /etc/login.conf
+
+# Run Tor
+rcctl enable tor
+rcctl start tor