Skip to content

Commit

Permalink
refactor: 💡 tweak healthcheck support docker
Browse files Browse the repository at this point in the history
  • Loading branch information
heldrida committed Oct 20, 2023
1 parent 054fd56 commit 6b89a02
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions scripts/healthcheck
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,17 @@ warningCount=0
if [[ -f "$defaultLightningSystemdServicePath" || -f "$defaultLightningSystemdServicePathForDocker" ]]; then
sudo rm -f "$defaultLightningOutputLogAbsPath"
sudo rm -f "$defaultLightningDiagnosticLogAbsPath"


echo "🤖 The Systemd service will restart, be patient..."

if [[ -f "$defaultLightningSystemdServicePathForDocker" ]]; then
sudo systemctl restart "$defaultLightningSystemdServiceNameForDocker"
if ! sudo systemctl restart "$defaultLightningSystemdServiceNameForDocker"; then
echo "👹 Oops! Failed to restart the Docker Container for some reason..."
fi

# This is intentional to allow Docker service to launch
# TODO: Replace with while loop and docker inspect checkup
sleep 5
else
sudo systemctl restart "$defaultName"
fi
Expand Down

0 comments on commit 6b89a02

Please sign in to comment.