first commit

This commit is contained in:
julien 2025-01-14 18:01:34 +01:00
commit 7f1c51fc27
4 changed files with 23 additions and 0 deletions

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# scripts
Execute `sync.sh` to copy scripts on the server.

9
sbin/vol-compress Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
if [ ! -d "volumes" ]; then
echo 'There is no data to archive ! Make sure you are in a service directory with persistent data (ie. must be a "volumes" directory there).'
exit
fi
ARCHIVE=${PWD##*/}.tar.zst
tar --zstd -cf $ARCHIVE -C volumes .

8
sbin/vol-extract Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
ARCHIVE=${PWD##*/}.tar.zst
if [ -d "volumes" ]; then
rm -r volumes
fi
mkdir volumes
tar --zstd --same-owner -xvf $ARCHIVE -C volumes

3
sync.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
cp sbin/* /usr/local/sbin