mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
Imported usable scripts from the private temporary repository
This commit is contained in:
15
scripts/create-a-crypted-btrfs-device.sh
Executable file
15
scripts/create-a-crypted-btrfs-device.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
: ${DEVICE:?not set}
|
||||
: ${LABEL:?not set}
|
||||
: ${MOUNT_OPTIONS:-compress-force=zstd}
|
||||
|
||||
[[ ${EUID} -eq 0 ]] || (echo "Please rerun this script with root privileges" && exit 1)
|
||||
[[ -f "${DEVICE}" ]] || echo "${DEVICE} not found"
|
||||
|
||||
cryptsetup luksFormat "${DEVICE}"
|
||||
cryptsetup luksOpen "${DEVICE}" "${LABEL}"
|
||||
mkfs.btrfs --label "${LABEL}" "/dev/mapper/${LABEL}"
|
||||
mount --types btrfs --options "${MOUNT_OPTIONS}" "/dev/mapper/${LABEL}" "/mnt/${LABEL}"
|
||||
umount "/mnt/${LABEL}"
|
||||
cryptsetup luksClose "${DEVICE}"
|
||||
8
scripts/dropbox/start-multiple-instances.sh
Normal file
8
scripts/dropbox/start-multiple-instances.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
DROPBOX_ACCOUNTS="${DROPBOX_ACCOUNTS:-private work}"
|
||||
|
||||
for ACCOUNT in $DROPBOX_ACCOUNTS
|
||||
do
|
||||
HOME="${HOME}/.dropbox-${ACCOUNT}" dropbox start &
|
||||
done
|
||||
40
scripts/dropbox/update-multiple-instances.sh
Normal file
40
scripts/dropbox/update-multiple-instances.sh
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
function dropbox-install {
|
||||
export DROPBOX_archive="dropbox_daemon.tar.gz"
|
||||
export DROPBOX_retries="3"
|
||||
export DROPBOX_url="http://www.getdropbox.com/download?plat=lnx.x86_64"
|
||||
|
||||
# download daemon
|
||||
echo " downloading archive…"
|
||||
curl -C - -o $DROPBOX_archive --retry $DROPBOX_retries -S -L $DROPBOX_url
|
||||
|
||||
# install daemon
|
||||
echo " unarchiving tarball…"
|
||||
tar zxf $DROPBOX_archive -C $HOME
|
||||
|
||||
# cleaning
|
||||
rm $DROPBOX_archive
|
||||
}
|
||||
|
||||
if [ ! -f start-multiple-instances.sh ]
|
||||
then
|
||||
echo "[ERROR] Dropbox multi-instances start script not usable. Aborrting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d ${HOME}/.dropbox-dist ]
|
||||
then
|
||||
echo "[WARNING] Default Dropbox dist directory not found."
|
||||
echo "[WARNING] Downloading and installing in the default directory."
|
||||
else
|
||||
rm -r ${HOME}/.dropbox-dist
|
||||
fi
|
||||
|
||||
echo "[NOTICE] Stopping all processes using the current version of Dropbox."
|
||||
killall -I dropbox
|
||||
|
||||
dropbox-install
|
||||
|
||||
echo "[NOTICE] Faccio ripartire il processo per ogni account"
|
||||
./start-multiple-instances.sh
|
||||
8
scripts/flatpak/bitwarden-install.sh
Normal file
8
scripts/flatpak/bitwarden-install.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
flatpak remote-add \
|
||||
--user --if-not-exists \
|
||||
flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
flatpak install --or-update --user \
|
||||
--noninteractive --assumeyes \
|
||||
flathub com.bitwarden
|
||||
Reference in New Issue
Block a user