commit 4120dac391b2ed0c07549453f37908368d986498 Author: surtur Date: Wed Apr 20 17:02:58 2022 +0200 initial commit diff --git a/alltheconfigs.sh b/alltheconfigs.sh new file mode 100755 index 0000000..6b71e30 --- /dev/null +++ b/alltheconfigs.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# this little script backs up all the config files that matter + +dotfiles=~/utils/dotfiles +MEGA="MEGA/Private" + +params="auP" +if [ "$1" == "-d" ]; then + params="aunP" # rsync -n for dry run +fi + +rsync -$params /etc/X11/Xresources $dotfiles/etc/X11 + +rsync -$params ~/alltheconfigs.sh $dotfiles + +rsync -$params ~/.vimrc $dotfiles/vimrc +#rsync -$params ~/.gvimrc $dotfiles/gvimrc really using just vimrc +rsync -$params ~/.zshrc $dotfiles/zsh/zshrc + +#rsync -$params ~/$MEGA/backups/authenticator.sh $dotfiles/backups +rsync -$params ~/$MEGA/backups/createarchive.sh $dotfiles/backups + +rsync -$params ~/$MEGA/fedora-backup/fedora-setup/fedora-setup.sh $dotfiles/setup-env +rsync -$params ~/$MEGA/fedora-backup/fedora-setup/deploy-dotfiles.sh $dotfiles/setup-env +rsync -$params ~/$MEGA/fedora-backup/fedora-setup/EASetup.sh $dotfiles/setup-env + +rsync -$params ~/.oh-my-zsh/themes/myowntheme* $dotfiles/zsh/oh-my-zsh/themes diff --git a/gethugo b/gethugo new file mode 100755 index 0000000..575c322 --- /dev/null +++ b/gethugo @@ -0,0 +1,30 @@ +#!/bin/bash + +PATH=~/.local/bin:$PATH + +if [ -z $1 ]; then + echo "[x] HUGO_VERSION is not set, pass it as \$1" + exit 9001 +else + HUGO_VERSION=$1 +fi + +if [ $(hugo version | grep -q ${HUGO_VERSION}; echo $?) -eq 0 ]; then + echo "[*] which hugo: $(which hugo)" + echo "[*] already on $HUGO_VERSION, exiting..." + exit 0 +fi + +nutmp=$(mktemp -d);cd "$nutmp";unset nutmp + +WORKDIR=$(pwd) +HOMEBIN="/home/$USER/.local/bin" +mkdir -pv $HOMEBIN + +echo "[*] downloading hugo version \"$HUGO_VERSION\"" +curl -sL https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz | bsdtar xfv - +mv -vf hugo ${HOMEBIN} + +cd .. +rm -rfv $WORKDIR +echo "[*] hugo updated to version $HUGO_VERSION" diff --git a/getnebulaconfigs b/getnebulaconfigs new file mode 100755 index 0000000..c69b5f3 --- /dev/null +++ b/getnebulaconfigs @@ -0,0 +1,23 @@ +#!/bin/bash + +# simple config backup script for nebula +remote="root@dotya.ml" +myrsync="rsync -auvP" +dest=~/utils/nebula + +cd $dest + +$myrsync $remote:/etc/gitea/app.ini . & +$myrsync $remote:/etc/nginx/nginx.conf . & +$myrsync $remote:/etc/redis/redis.conf . & +$myrsync $remote:/etc/smtpd/{smtpd.conf,mailname,aliases,vdoms,vusers,creds} ./smtpd & +$myrsync $remote:/etc/ssh/sshd_config . & +$myrsync $remote:/etc/fstab . & +$myrsync $remote:/etc/crypttab . & +$myrsync $remote:/etc/lvm/lvm.conf . & + +$myrsync $remote:/root/.zshrc ./root/zshrc +$myrsync $remote:/root/.ssh/ ./root/ssh + +$myrsync $remote:/home/vis/.ssh/ ./vis/ssh +$myrsync $remote:/home/vis/.config/ --exclude="*Bittorrent-data*" ./vis/config