wip
This commit is contained in:
34
dots/bin/cryptomatorBackup.sh
Executable file
34
dots/bin/cryptomatorBackup.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# klevstul :: 26.02.24
|
||||
|
||||
|
||||
# make sure cryptLocal is mounted and available
|
||||
|
||||
src_dir=/home/poq/.local/share/Cryptomator/mnt/cryptLocal
|
||||
tmp_dir=/tmp
|
||||
trg_dir=/home/poq/syncDir/0_downloads
|
||||
|
||||
if ! [ -d "$src_dir" ]
|
||||
then
|
||||
echo "missing source directory:"
|
||||
echo "$src_dir"
|
||||
echo "is the cryptLocal vault mounted?"
|
||||
exit
|
||||
fi
|
||||
|
||||
# zip the content
|
||||
timestamp=$(date +%y%m%d)
|
||||
zip_file=${tmp_dir}/${timestamp}_cryptLocal.zip
|
||||
zip -r "${zip_file}" "${trg_dir}/"
|
||||
|
||||
# gpg encrypt the content
|
||||
gpg --encrypt --sign --recipient frode@klevstul.com "${zip_file}"
|
||||
|
||||
# delete the .zip file
|
||||
srm -v "${zip_file}"
|
||||
|
||||
# move the .gpg file to the target dir
|
||||
mv "${zip_file}.gpg" "${trg_dir}/"
|
||||
|
||||
ls -al "${trg_dir}/"
|
||||
@@ -1 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# klevstul :: 26.02.23
|
||||
|
||||
start-hyprland &
|
||||
|
||||
@@ -2,19 +2,30 @@
|
||||
|
||||
# klevstul :: 24.06
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
# how to backup gpg:
|
||||
# gpg --export --export-options backup --output public.gpg frode@thisworld.is
|
||||
# gpg --export-secret-keys --export-options backup --output private.gpg frode@thisworld.is
|
||||
# ref: https://www.howtogeek.com/816878/how-to-back-up-and-restore-gpg-keys-on-linux/
|
||||
#
|
||||
# new method:
|
||||
# cp /home/poq/.gnupg/
|
||||
# gpg --armor --export frode@klevstul.com > /home/poq/.local/share/Cryptomator/mnt/cryptLocal/content/keys/openPgp/.gnupg/251110_frodeKlevstul_publicKey.asc
|
||||
# gpg --armor --export-secret-keys frode@klevstul.com > /home/poq/.local/share/Cryptomator/mnt/cryptLocal/content/keys/openPgp/.gnupg/251110_frodeKlevstul_privateKey.asc
|
||||
#
|
||||
# old method:
|
||||
# gpg --export --export-options backup --output public.gpg frode@thisworld.is
|
||||
# gpg --export-secret-keys --export-options backup --output private.gpg frode@thisworld.is
|
||||
# ref: https://www.howtogeek.com/816878/how-to-back-up-and-restore-gpg-keys-on-linux/
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
this_file_name=`basename "$0"`
|
||||
echo "$this_file_name"
|
||||
|
||||
echo "please, remember the hint: poq.l2"
|
||||
|
||||
# location of ssh keys
|
||||
syncdir_env_var=SYNCDIR_${HOSTNAME}
|
||||
src_gnupg_dir=${!syncdir_env_var}/secrets/gnupg
|
||||
|
||||
gpg --import ${src_gnupg_dir}/public.gpg
|
||||
gpg --import ${src_gnupg_dir}/private.gpg
|
||||
gpg --import ${src_gnupg_dir}/*publicKey.asc
|
||||
gpg --import ${src_gnupg_dir}/*privateKey.asc
|
||||
|
||||
gpg --list-secret-keys --keyid-format LONG
|
||||
|
||||
34
dots/bin/obsolete/obsolete.updateLicences.sh
Executable file
34
dots/bin/obsolete/obsolete.updateLicences.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# what: update licences
|
||||
# author: njs ➔ fk
|
||||
# started: apr 2022
|
||||
#
|
||||
# requires: n/a
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
if [ "$EUID" -eq 0 ]
|
||||
then echo "error: do not run as 'root'"
|
||||
exit
|
||||
fi
|
||||
|
||||
src_dir=/mnt/nas/cb/software/licences
|
||||
trg_dir=/home/poq/.local/share/Cryptomator/mnt/cryptLocal/content/licences
|
||||
|
||||
if ! [ -d "$src_dir" ]
|
||||
then
|
||||
echo "missing source directory:"
|
||||
echo "$src_dir"
|
||||
exit
|
||||
fi
|
||||
|
||||
if ! [ -d "$trg_dir" ]
|
||||
then
|
||||
echo "missing target directory:"
|
||||
echo "$trg_dir"
|
||||
exit
|
||||
fi
|
||||
|
||||
echo copying files from $src_dir to $trg_dir...
|
||||
cp $src_dir/*.txt $trg_dir/
|
||||
33
dots/bin/pushToCryptCloud.sh
Executable file
33
dots/bin/pushToCryptCloud.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# klevstul :: push content from cryptLocal to cryptCloud (cryptomator vaults) :: apr 2022
|
||||
|
||||
# note: both vaults must be mounted before running this script
|
||||
|
||||
|
||||
if [ "$EUID" -eq 0 ]
|
||||
then echo "error: do not run as 'root'"
|
||||
exit
|
||||
fi
|
||||
|
||||
src_dir=/home/poq/.local/share/Cryptomator/mnt/cryptLocal/content
|
||||
trg_dir=/home/poq/.local/share/Cryptomator/mnt/cryptCloud/
|
||||
|
||||
if ! [ -d "$src_dir" ]
|
||||
then
|
||||
echo "missing source directory:"
|
||||
echo "$src_dir"
|
||||
echo "has something happened to the 'content/' directory?"
|
||||
exit
|
||||
fi
|
||||
|
||||
if ! [ -d "${trg_dir}/content" ]
|
||||
then
|
||||
echo "missing target directory:"
|
||||
echo "$trg_dir"
|
||||
echo "is the cryptCloud vault unlocked?"
|
||||
exit
|
||||
fi
|
||||
|
||||
echo copying files from $src_dir to $trg_dir...
|
||||
rsync -v -r -a --delete $src_dir $trg_dir
|
||||
@@ -1,10 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# : klevstul : start miscellanous application : 25.12.28
|
||||
|
||||
# note: i was unable to automatically start these programs from startup_auto.sh, so hence i have created
|
||||
# this file, for manually running it, and starting misc programs.
|
||||
# -----
|
||||
# klevstul :: start miscellanous application :: 25.12.28
|
||||
|
||||
notify-send "<< startup.sh >>"
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# klevstul :: n/a
|
||||
|
||||
|
||||
# https://docs.python.org/3/library/http.server.html
|
||||
|
||||
python3 -m http.server \
|
||||
|
||||
Reference in New Issue
Block a user