Home : Update scripts.

This commit is contained in:
Dmitry Voronin 2024-01-25 21:35:46 +03:00
parent dd2e0ad7cf
commit f62332b3f1
5 changed files with 19 additions and 20 deletions

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Source modules.
for file in /var/roothome/.config/bash/module/*.sh; do

View file

@ -1,5 +1,16 @@
#!/bin/bash
#!/usr/bin/env bash
source /var/roothome/app/bin/home/shared.sh
shopt -s globstar
shopt -s dotglob
notify()
{
curl -X POST -H 'Content-Type: Application/json' -d "{\"chat_id\":\"155897358\",\"text\":\"$1\"}" https://api.telegram.org/bot2046849441:AAHQpjRK4xpL8tEUyN4JTSDUUze4J0wSIy4/sendMessage &> /dev/null
}
notify_silent()
{
curl -X POST -H 'Content-Type: Application/json' -d "{\"chat_id\":\"155897358\",\"text\":\"$1\",\"disable_notification\":\"true\"}" https://api.telegram.org/bot2046849441:AAHQpjRK4xpL8tEUyN4JTSDUUze4J0wSIy4/sendMessage &> /dev/null
}
docker exec -u 33 cloud php -f /var/www/html/cron.php || notify 'nextcloud : failed to run cron'

View file

@ -1,6 +1,6 @@
#!/bin/bash
#!/usr/bin/env bash
in="/var/roothome/docker/cloud/data/data/cakee/files/media/photo/"
out="/var/mnt/storage/cold_1/backup/tmp/photo/"
in="/storage/hot/docker/cloud/data/data/cakee/files/media/photo/"
out="/storage/cold_1/backup/tmp/photo/"
/usr/bin/docker run --rm -v "${in}":/in -v "${out}":/out voronind.com/photoprocess:latest

View file

@ -1,12 +0,0 @@
shopt -s globstar
shopt -s dotglob
notify()
{
curl -X POST -H 'Content-Type: Application/json' -d "{\"chat_id\":\"155897358\",\"text\":\"$1\"}" https://api.telegram.org/bot2046849441:AAHQpjRK4xpL8tEUyN4JTSDUUze4J0wSIy4/sendMessage &> /dev/null
}
notify_silent()
{
curl -X POST -H 'Content-Type: Application/json' -d "{\"chat_id\":\"155897358\",\"text\":\"$1\",\"disable_notification\":\"true\"}" https://api.telegram.org/bot2046849441:AAHQpjRK4xpL8tEUyN4JTSDUUze4J0wSIy4/sendMessage &> /dev/null
}

View file

@ -1,5 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
music="/var/mnt/storage/hot/media/music/"
music="/storage/hot/media/music/"
/usr/bin/docker run --rm -v "${music}":/music voronind.com/yamusic:latest