Skip to content

Instantly share code, notes, and snippets.

View jfisbein's full-sized avatar

Joan jfisbein

View GitHub Profile
@jfisbein
jfisbein / fritzbox-cert-update.sh
Last active February 1, 2020 18:15 — forked from wikrie/fritzbox-cert-update.sh
Fritzbox Fritz!Box AVM SSL Letsencrypt automatically update
#!/bin/bash
MIN_EXPECTED_ARGS=4
if [ $# -lt $MIN_EXPECTED_ARGS ]; then
echo "Script to update the FritzBox SSL certificate"
echo ""
echo "Expected at least ${MIN_EXPECTED_ARGS} args"
echo ""
echo "Usage: $(basename "${0}") {username} {password} {cert-key-file} {cert-fullchain-file} [cert-password] [fritzbox-host]"
echo " - [cert-password] only needed if the {cert-key-file} is protected by a password"
#!/bin/bash
src_git="$1"
dst_git="$2"
git clone --mirror ${src_git} migrate
cd migrate
git remote add dst ${dst_git}
git push --mirror dst
cd ..