debian scripts from 7040

This commit is contained in:
2025-12-28 20:18:55 -07:00
parent b351cbddfb
commit 23987b2087
4 changed files with 92 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
# Variables
CONTAINER_NAME="yacreader"
LIBRARY_PATH="/comics"
COMMAND="YACReaderLibraryServer update-library"
# Check if the container is running
if docker ps --format "{{.Names}}" | grep -q "^$CONTAINER_NAME$"; then
echo "Container '$CONTAINER_NAME' is running. Executing the update command..."
docker exec "$CONTAINER_NAME" $COMMAND "$LIBRARY_PATH"
if [ $? -eq 0 ]; then
echo "Library update completed successfully."
else
echo "An error occurred while updating the library."
exit 1
fi
else
echo "Error: Container '$CONTAINER_NAME' is not running."
exit 1
fi