Compare commits
No commits in common. "9ce57763cbfeaadd6cbc43e87c175b52be37e2bd" and "bdc094663dea197d94b7be0ccc54f320fb7869a3" have entirely different histories.
9ce57763cb
...
bdc094663d
@ -1,7 +1,6 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Ghost Node
|
Description=Ghost Node
|
||||||
After=network-online.target
|
After=network.target
|
||||||
Requires=network-online.target
|
|
||||||
Documentation=https://git.ghostchain.io/ghostchain/ghost-node
|
Documentation=https://git.ghostchain.io/ghostchain/ghost-node
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
SCRIPT_DIR=$(dirname "$0")
|
|
||||||
bash "$SCRIPT_DIR/patches/patch-1.sh"
|
|
@ -1,32 +0,0 @@
|
|||||||
DEFAULT_SERVICE_NAME="ghost-node.service"
|
|
||||||
|
|
||||||
check_unit_file_validity() {
|
|
||||||
SERVICE_NAME=$1
|
|
||||||
if [[ "$SERVICE_NAME" != *.service ]]; then
|
|
||||||
SERVICE_NAME="${SERVICE_NAME}.service"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SERVICE_FULL_PATH="/etc/systemd/system/$SERVICE_NAME"
|
|
||||||
if [[ -e "$SERVICE_FULL_PATH" ]]; then
|
|
||||||
NETWORK_ONLINE_EXISTS=$(grep -Fx "After=network-online.target" "$SERVICE_FULL_PATH")
|
|
||||||
NETWORK_EXISTS=$(grep -Fx "After=network.target" "$SERVICE_FULL_PATH")
|
|
||||||
|
|
||||||
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\nRequires=network-online.target/g" "$SERVICE_FULL_PATH"
|
|
||||||
else
|
|
||||||
echo "[+] INFO: network-online.target is set correctly for $SERVICE_FULL_PATH"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "[-] No serivce found at $SERVICE_FULL_PATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
check_unit_file_validity $DEFAULT_SERVICE_NAME
|
|
||||||
read -p "[?] Enter names for the node service, separated by commas (default: ghost-node): " -a SERVICE_NAMES
|
|
||||||
for NAME in "${SERVICE_NAMES[@]}"; do
|
|
||||||
check_unit_file_validity $NAME
|
|
||||||
done
|
|
||||||
sudo systemctl daemon-reload
|
|
Loading…
Reference in New Issue
Block a user