Initial commit

This commit is contained in:
2025-11-06 20:28:41 +01:00
commit 5fc4fbcef3
182 changed files with 4742 additions and 0 deletions

2
home/root/.secrets Normal file
View File

@@ -0,0 +1,2 @@
tga-credentials=tga:9yL5b4+WqM
zero-credentials=zero:38cjbsqogkHbsq36uXkWgCpla3cxYopL

8
home/root/copy-music.sh Normal file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
set -o errexit -o pipefail -o noclobber -o nounset
target=/var/mnt/nas/containers/navidrome/storage/music
ugid="$(stat -c "%U:%G" "${target}")"
source=/var/mnt/nas/containers/nextcloud/storage/data/__groupfolders/1/media/music
podman run --rm -v "${source}":/input -v "${target}":/output docker.io/eeacms/rsync -a /input /output
chown -R "${ugid}" "${target}"

View File

@@ -0,0 +1,28 @@
#!/bin/bash
set -o errexit -o pipefail -o noclobber -o nounset
echo "Running $(date)"
torrents=/var/mnt/nas/containers/qbittorrent/storage/torrents
jdownloader=/var/mnt/nas/containers/jdownloader/storage/output/completed
target=/var/mnt/nas/containers/nextcloud/storage/data/__groupfolders/1/downloads
num_torrents="$(find "${torrents}" -maxdepth 1 -type f | wc -l)" || echo 0
if [[ "${num_torrents}" -gt 0 ]]; then
find "${torrents}" -maxdepth 1 -type f -exec mv {} "${target}/" \;
fi
echo "Found ${num_torrents} torrent files"
num_jdownloader="$(ls "${jdownloader}" | wc -l)" || echo 0
if [[ "${num_jdownloader}" -gt 0 ]]; then
mv "${jdownloader}/"* "${target}/"
fi
echo "Found ${num_jdownloader} jdownloader files"
total_files=$(("${num_torrents}" + "${num_jdownloader}"))
if [[ "${total_files}" -gt 0 ]]; then
ugid="$(stat -c "%U:%G" "${target}")"
chown -R "${ugid}" "${target}/"*
chmod 755 "${target}/"*
echo "Running podman"
cd /var/home/nextcloud
sudo -u nextcloud podman exec -it nextcloud bash -c "/var/www/html/occ groupfolders:scan 1"
cd -
fi