mirror of
https://git.ghostchain.io/proxmio/ghost-node.git
synced 2025-12-27 03:09:56 +00:00
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:
@@ -1,6 +1,7 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Ghost Node
|
Description=Ghost Node
|
||||||
After=network.target
|
After=network-online.target
|
||||||
|
Requires=network-online.target
|
||||||
Documentation=https://git.ghostchain.io/ghostchain/ghost-node
|
Documentation=https://git.ghostchain.io/ghostchain/ghost-node
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ check_unit_file_validity() {
|
|||||||
if [[ -z "$NETWORK_ONLINE_EXISTS" && -n "$NETWORK_EXISTS" ]]
|
if [[ -z "$NETWORK_ONLINE_EXISTS" && -n "$NETWORK_EXISTS" ]]
|
||||||
then
|
then
|
||||||
echo "[-] WARNING: missing network-online.target dependency in $SERVICE_FULL_PATH, trying to replace"
|
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
|
else
|
||||||
echo "[+] INFO: network-online.target is set correctly for $SERVICE_FULL_PATH"
|
echo "[+] INFO: network-online.target is set correctly for $SERVICE_FULL_PATH"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user