Created
October 24, 2021 18:39
-
-
Save basilmusa/37ec89ab360e9aa9500f632fa8df0772 to your computer and use it in GitHub Desktop.
Install Restic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "*** This script must be run as root ***" | |
exit 1 | |
fi | |
if hash restic 2>/dev/null; then | |
echo "*** restic is already installed ***"; | |
restic version | |
exit 0; | |
fi | |
cd /usr/local/bin | |
wget https://github.com/restic/restic/releases/download/v0.12.1/restic_0.12.1_linux_amd64.bz2 -q -O restic.bz2 | |
bunzip2 restic.bz2 | |
chmod +x restic | |
restic generate --bash-completion /etc/bash_completion.d/restic | |
cd $OLDPWD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment