Files
soleprint/mainroom/soleprint/ctrl/server/restart.sh
2025-12-24 07:10:08 -03:00

25 lines
605 B
Bash
Executable File

#!/bin/bash
# Restart pawprint services
# Usage: ./restart.sh [service]
# Example: ./restart.sh (restarts all services)
# ./restart.sh artery (restarts only artery)
set -e
TARGET="${1:-all}"
# Handle all (default)
if [ "$TARGET" = "all" ]; then
echo "Restarting all services..."
systemctl restart pawprint artery album ward
echo "Status:"
systemctl status pawprint artery album ward --no-pager | grep -E "●|Active:"
exit 0
fi
echo "Restarting $TARGET..."
systemctl restart "$TARGET"
echo "Status:"
systemctl status "$TARGET" --no-pager | grep -E "●|Active:"