added time to log
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user