You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A collection of scripts from [The Obscure Organization](https://www.obscure.org) - a public access UNIX system in continuous use since 1995.
5
5
6
-
*[blockip.sh](blockip.sh) - Use iptables to temporarily block an IP addreess or CIDR block
7
-
*[btidy.sh](btidy.sh) - Use [HTML tidy](https://www.html-tidy.org/) but only versus the body of an HTML file. Useful for filtering fragments of HTML files, or for using in vim (`:'a,'b ! btidy -wrap 0 -i -asxml`)
8
-
*[cloud-init-centos-7-ipv6.yml](cloud-init-centos-7-ipv6.yml) - Use in instance data for CentOS 7.x EC2 servers that are having trouble getting an IPv6 default route. See also
6
+
## blockip.sh
7
+
8
+
[blockip.sh](blockip.sh) - Use iptables to temporarily block an IP addreess or CIDR block
9
+
10
+
### Description
11
+
This script uses iptables to temporarily block an IP address or CIDR block. It can be useful for mitigating unwanted traffic or attacks.
12
+
13
+
### Usage
14
+
```sh
15
+
./blockip.sh 192.2.0.0
16
+
./blockip.sh 192.2.0.1 now+1day
17
+
```
18
+
Symlink this into /usr/local/sbin to use it system-wide. To run with debugging information enabled:
19
+
```sh
20
+
DEBUG=true /usr/local/sbin/blockip.sh
21
+
```
22
+
23
+
## btidy.sh
24
+
25
+
[btidy.sh](btidy.sh) - Use [HTML tidy](https://www.html-tidy.org/) but only versus the body of an HTML file. Useful for filtering fragments of HTML files, or for using in vim (`:'a,'b ! btidy -wrap 0 -i -asxml`)
26
+
27
+
### Description
28
+
This script uses HTML tidy to clean up the body of an HTML file. It is useful for filtering fragments of HTML files or for use in vim.
29
+
30
+
### Usage
31
+
```sh
32
+
./btidy.sh <filename> [options] ...
33
+
```
34
+
From vi family editors, assuming btidy.sh is in your path:
35
+
```sh
36
+
:% ! btidy.sh [options]
37
+
:'a,'b ! btidy.sh -i
38
+
```
39
+
40
+
## cloud-init-centos-7-ipv6.yml
41
+
42
+
[cloud-init-centos-7-ipv6.yml](cloud-init-centos-7-ipv6.yml) - Use in instance data for CentOS 7.x EC2 servers that are having trouble getting an IPv6 default route. See also
9
43
[cloud-init-centos-7.6-ipv4-ena.yml](cloud-init-centos-7.6-ipv4-ena.yml) and [cloud-init-centos-7.6-ipv6-ena.yml](cloud-init-centos-7.6-ipv4-ena.yml)
10
-
*[icinga2-graceful.sh](icinga2-graceful.sh) - Check the validity of icinga2 system configuration files, then restart it only if the configuration is ok.
11
-
*[icinga2-watchdog.sh](icinga2-watchdog.sh) - Ensure that an icinga2 system alerts once per day to let people know it is still alive - and where to complain if it is dead.
12
-
*[imapd-reap-processes.sh](imapd-reap-processes.sh) - Kill off stale imapd processes that accumulate on a busy mail server
13
-
*[patronus.sh](patronus.sh) - kill login sessions and processes on other ttys, with a whimsical Harry Potter twist. This might be one of the only works of fan fiction parody written in `bash`!. Originally [released under the GPLv3](https://obscurerichard.wordpress.com/2007/09/06/harry-potter-shell-script-fan-fiction-in-celebration-of-my-35th-birthday/), now relicensed under the MIT license, and updated to be shellcheck clean.
14
-
*[run-sysbench.sh](run-sysbench.sh) - Run [sysbench](https://github.com/akopytov/sysbench) with a standard set of options. Useful for collecting the same set of performance statistics on multiple hosts.
15
-
*[ssh-add-all.sh](ssh-add-ramdisk.sh) - Alias to add all your SSH keys from $HOME/.ssh/ with one command.
44
+
45
+
### Description
46
+
This cloud-init configuration is intended for older CentOS 7.x EC2 instances that are having trouble getting an IPv6 default route. It includes specific configurations for the ENA adapter and other settings.
47
+
48
+
### Usage
49
+
Use this file as instance data when launching or configuring CentOS 7.x EC2 instances.
50
+
51
+
## icinga2-graceful.sh
52
+
53
+
[icinga2-graceful.sh](icinga2-graceful.sh) - Check the validity of icinga2 system configuration files, then restart it only if the configuration is ok.
54
+
55
+
### Description
56
+
This script validates the icinga2 configuration and restarts the service only if the configuration is valid. It helps prevent service disruptions due to invalid configurations.
57
+
58
+
### Usage
59
+
```sh
60
+
./icinga2-graceful.sh
61
+
```
62
+
To run with debugging information enabled:
63
+
```sh
64
+
DEBUG=true ./icinga2-graceful.sh
65
+
```
66
+
67
+
## icinga2-watchdog.sh
68
+
69
+
[icinga2-watchdog.sh](icinga2-watchdog.sh) - Ensure that an icinga2 system alerts once per day to let people know it is still alive - and where to complain if it is dead.
70
+
71
+
### Description
72
+
This script ensures that an icinga2 system sends a custom notification every day to remind you that it is still alive. It helps monitor the health of the icinga2 system.
73
+
74
+
### Usage
75
+
Configure an API user called "watchdog" in /etc/icinga2/conf.d/api-users.conf:
76
+
```sh
77
+
object ApiUser "watchdog" {
78
+
password = "replace-me-with-a-real-password"
79
+
permissions = [ "*" ]
80
+
}
81
+
```
82
+
Set up a host group in your conf.d/host-groups.conf:
83
+
```sh
84
+
object HostGroup "icinga-servers" {
85
+
display_name = "Icinga Servers"
86
+
assign where host.vars.icinga
87
+
}
88
+
```
89
+
Create a configuration file to customize the message and credentials, and put it in /etc/icinga2/icinga2-watchdog.env:
[patronus.sh](patronus.sh) - kill login sessions and processes on other ttys, with a whimsical magic twist.
117
+
118
+
### Description
119
+
This script kills login sessions and processes on other ttys the way Harry Potter would have done it. It is a parody of J.K. Rowling's novels; this is perhaps one of the only works of fan fiction _or_ parody written in `bash`!. Originally [released under the GPLv3](https://obscurerichard.wordpress.com/2007/09/06/harry-potter-shell-script-fan-fiction-in-celebration-of-my-35th-birthday/), now relicensed under the MIT license, and updated to be [shellcheck clean](https://shellcheck.net).
120
+
121
+
### Usage
122
+
```sh
123
+
./patronus.sh
124
+
```
125
+
To run with debugging information enabled:
126
+
```sh
127
+
DEBUG=true ./patronus.sh
128
+
```
129
+
130
+
## run-sysbench.sh
131
+
132
+
[run-sysbench.sh](run-sysbench.sh) - Run [sysbench](https://github.com/akopytov/sysbench) with a standard set of options. Useful for collecting the same set of performance statistics on multiple hosts.
133
+
134
+
### Description
135
+
This script runs a complete suite of sysbench performance benchmarks. It is useful for collecting the same set of performance statistics on multiple hosts.
136
+
137
+
### Usage
138
+
```sh
139
+
./run-sysbench.sh <storage_type>
140
+
```
141
+
Replace `<storage_type>` with either `disk` or `ssd`.
142
+
143
+
## ssh-add-all.sh
144
+
145
+
[ssh-add-all.sh](ssh-add-ramdisk.sh) - Alias to add all your SSH keys from $HOME/.ssh/ with one command.
146
+
147
+
### Description
148
+
This script adds all your SSH keys from $HOME/.ssh/ with one command. It is useful for quickly adding multiple SSH keys to the SSH agent.
149
+
150
+
### Usage
151
+
```sh
152
+
./ssh-add-all.sh
153
+
```
154
+
155
+
## ssh-add-ramdisk.sh
156
+
16
157
*[ssh-add-ramdisk.sh](ssh-add-ramdisk.sh) - Keep your SSH keys on a USB key, but load them into a RAMDisk on macOS or Linux - so you don't have to keep permanent copies of the SSH keys on the systems you physically use, which is useful sometimes.
158
+
159
+
### Description
160
+
This script allows you to copy your SSH keys from removable media to a RAM disk and then adds the SSH keys to your current SSH agent keyring. It is useful for keeping your SSH keys secure and not leaving permanent copies on the systems you use.
161
+
162
+
### Usage
163
+
```sh
164
+
./ssh-add-ramdisk.sh
165
+
```
166
+
To remove the ramdisk:
167
+
```sh
168
+
./ssh-add-ramdisk.sh -r
169
+
```
170
+
171
+
## ssh-env.sh
172
+
17
173
*[ssh-env.sh](ssh-env.sh) - Use to help reconnect managed terminal sessions (think `screen` or `tmux`) terminals to your SSH key agent via environment manipulation.
174
+
175
+
### Description
176
+
This script helps propagate the SSH environment inside the current session. It is useful for reconnecting managed terminal sessions (e.g., `screen` or `tmux`) to your SSH key agent.
177
+
178
+
### Usage
179
+
```sh
180
+
./ssh-env.sh
181
+
```
182
+
Inside your .profile, .bash_profile, or .bash_login:
183
+
```sh
184
+
./ssh-env.sh
185
+
```
186
+
When running interactively in a tmux or screen session, include the output of ssh-env.sh and regain access to your SSH agent:
187
+
```sh
188
+
.~/.ssh/env
189
+
```
190
+
191
+
## uptimerobot-firewall-update.sh
192
+
18
193
*[uptimerobot-firewall-update.sh](uptimerobot-firewall-update.sh) - Update firewall entries that allow [uptimerobot.com](https://www.uptimerobot.com/) to check otherwise resticted services. Uptime Robot is free and is suitable for small-scale monitoring as a primary service or as a secondary monitor that watches your primary monitoring system and most critical services.
19
-
*[tiamat-setup.sh](tiamat-setup.sh) - Set up packages and more on tiamat.obscure.org (emergency recovery script)
20
-
*[watch-filevault-setup.sh](wuhatch-filevault-setup.sh) - Watch and log the filevault encryption process, which can take a really long time on an older Macintosh.
194
+
195
+
### Description
196
+
This script updates the firewall entries to allow uptimerobot.com to check otherwise restricted services. It is useful for integrating Uptime Robot with your monitoring setup.
197
+
198
+
### Usage
199
+
Run this on a host that will be monitored through uptimerobot.com. Consider linking it into cron, for example:
[tiamat-setup.sh](tiamat-setup.sh) - Set up packages and more on tiamat.obscure.org (emergency recovery script)
207
+
208
+
### Description
209
+
This script sets up packages and more on `tiamat.obscure.org`, the main server for [The Obscure Organization](https://www.obscure.org/). It is an emergency recovery script for setting up the system after catastrophic failures, and also gets used to install packages and configure the system on an intermittent basis.
210
+
211
+
### Usage
212
+
Run this script as root to set up the necessary packages and configurations on `tiamat.obscure.org`.
213
+
214
+
```sh
215
+
sudo ./tiamat-setup.sh
216
+
```
217
+
218
+
## watch-filevault-setup.sh
219
+
220
+
*[watch-filevault-setup.sh](watch-filevault-setup.sh) - Watch and log the filevault encryption process, which can take a really long time on an older Macintosh.
221
+
222
+
### Description
223
+
This script watches the progress of FileVault and logs the progress to a file. It is useful for monitoring the FileVault encryption process on macOS.
0 commit comments