Commit 4ba5971f authored by Fabian 'xx4h' Melters's avatar Fabian 'xx4h' Melters

Add specific command for renew

parent 75a5fcf6
renewcert
\ No newline at end of file
#!/bin/bash
PLUGIN="$(basename ${0/-renew})"
DOMAIN="$1"
if [ "$PLUGIN" = "renewcert" ]; then
echo "You cannot use 'renewcert' directly, use one of the supported plugins"
exit 0
elif [ ! -d "plugins/$PLUGIN" ]; then
echo "There is no Plugin '$PLUGIN'"
exit 0
fi
if [ ! -f "plugins/$PLUGIN/auth" ]; then
echo "The auth script for Plugin '$PLUGIN' is missing"
exit 0
fi
if [ ! -f "plugins/$PLUGIN/cleanup" ]; then
echo "The cleanup script for Plugin '$PLUGIN' is missing"
exit 0
fi
if [ "$DOMAIN" = "" ]; then
echo "Usage: $PLUGIN DOMAIN"
exit 0
fi
certbot renew -n --cert-name $DOMAIN --manual --preferred-challenges=dns --manual-auth-hook plugins/$PLUGIN/auth --manual-cleanup-hook plugins/$PLUGIN/cleanup
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment