extened the template.service for the node and add Requires= rule

Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
This commit is contained in:
Uncle Stinky
2025-04-29 22:02:33 +03:00
parent eab90d4173
commit 9ce57763cb
2 changed files with 3 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ check_unit_file_validity() {
if [[ -z "$NETWORK_ONLINE_EXISTS" && -n "$NETWORK_EXISTS" ]]
then
echo "[-] WARNING: missing network-online.target dependency in $SERVICE_FULL_PATH, trying to replace"
sudo sed -i 's/After=network.target/After=network-online.target/g' "$SERVICE_FULL_PATH"
sudo sed -i "s/After=network.target/After=network-online.target\nRequires=network-online.target/g" "$SERVICE_FULL_PATH"
else
echo "[+] INFO: network-online.target is set correctly for $SERVICE_FULL_PATH"
fi