Skip to content

Instantly share code, notes, and snippets.

@Zaczero
Last active August 24, 2023 10:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zaczero/2f1f845c63b85245653127fa56619164 to your computer and use it in GitHub Desktop.
Save Zaczero/2f1f845c63b85245653127fa56619164 to your computer and use it in GitHub Desktop.
Simple install script for certbot-ocsp-fetcher on Debian-based distros
#!/bin/sh
# This install script is licensed under the Creative Commons Zero 1.0 Universal license.
# For more information, please see <https://creativecommons.org/publicdomain/zero/1.0/>
set -e
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
TMP_DIR="/tmp/install-certbot-ocsp-fetcher"
[ -d "$TMP_DIR" ] && rm -rf "$TMP_DIR"
echo "Installing dependencies..."
apt-get update
apt-get install -y bash certbot openssl util-linux git
echo "Cloning certbot-ocsp-fetcher..."
git clone https://github.com/tomwassenberg/certbot-ocsp-fetcher.git "$TMP_DIR"
echo "Installing certbot-ocsp-fetcher..."
install -Dm755 "$TMP_DIR/certbot-ocsp-fetcher" /usr/bin/certbot-ocsp-fetcher
install -Dm644 "$TMP_DIR/LICENSE" /usr/share/licenses/certbot-ocsp-fetcher/LICENSE
echo "Cleaning up..."
rm -rf "$TMP_DIR"
echo "Installation completed!"
certbot-ocsp-fetcher --help
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment