added time to log

This commit is contained in:
oliver
2026-04-21 17:42:17 -03:00
parent 3deb54f5aa
commit 7e23c50a4f
3 changed files with 10 additions and 11 deletions
+2 -3
View File
@@ -2,7 +2,7 @@
# Check that a search string was provided
if [ -z "$1" ]; then
echo "Usage: $0 <search_string>"
echo "$(date '+%Y-%m-%d %H:%M:%S') Usage: $0 <search_string>"
exit 1
fi
@@ -16,8 +16,7 @@ uuids=$(sqlite3 "$DB_PATH" "SELECT UUID FROM containers WHERE tags LIKE '%$SEARC
for uuid in $uuids; do
# Check if a container with this name is running
if doas docker ps --format '{{.Names}}' | grep -qx "$uuid"; then
echo "Restarting $uuid"
echo "$(date '+%Y-%m-%d %H:%M:%S') Restarting $uuid"
/4server/sbin/startContainer $uuid
fi
done