bugfix
This commit is contained in:
parent
f098ae0f9d
commit
889b300c07
@ -51,11 +51,11 @@ ARCH=$(uname -m)
|
||||
|
||||
# Step10.1:Determine the ExecStart line based on the architecture
|
||||
if [ "$ARCH" = "x86_64" ]; then
|
||||
EXEC_START="$PATH/node-1.4.18-linux-amd64"
|
||||
EXEC_START="/root/ceremonyclient/node/node-1.4.18-linux-amd64"
|
||||
elif [ "$ARCH" = "aarch64" ]; then
|
||||
EXEC_START="$PATH/node-1.4.18-linux-arm64"
|
||||
EXEC_START="/root/ceremonyclient/node/node-1.4.18-linux-arm64"
|
||||
elif [ "$ARCH" = "arm64" ]; then
|
||||
EXEC_START="$PATH/node-1.4.18-darwin-arm64"
|
||||
EXEC_START="/root/ceremonyclient/node/node-1.4.18-darwin-arm64"
|
||||
else
|
||||
echo "Unsupported architecture: $ARCH"
|
||||
exit 1
|
||||
@ -74,7 +74,7 @@ Type=simple
|
||||
Restart=always
|
||||
RestartSec=5s
|
||||
WorkingDirectory=/root/ceremonyclient/node
|
||||
ExecStart=/root/ceremonyclient/node/$PATH
|
||||
ExecStart=$EXEC_START
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
16
update.sh
16
update.sh
@ -18,19 +18,13 @@ git checkout release
|
||||
# Get the system architecture
|
||||
ARCH=$(uname -m)
|
||||
|
||||
# Get the current user's home directory
|
||||
HOME_DIR=$(eval echo ~$USER)
|
||||
|
||||
# Use the home directory in the path
|
||||
PATH="$HOME_DIR/ceremonyclient/node"
|
||||
|
||||
# Step10.1:Determine the ExecStart line based on the architecture
|
||||
# Determine the ExecStart line based on the architecture
|
||||
if [ "$ARCH" = "x86_64" ]; then
|
||||
EXEC_START="$PATH/node-1.4.18-linux-amd64"
|
||||
EXEC_START="/root/ceremonyclient/node/node-1.4.18-linux-amd64"
|
||||
elif [ "$ARCH" = "aarch64" ]; then
|
||||
EXEC_START="$PATH/node-1.4.18-linux-arm64"
|
||||
EXEC_START="/root/ceremonyclient/node/node-1.4.18-linux-arm64"
|
||||
elif [ "$ARCH" = "arm64" ]; then
|
||||
EXEC_START="$PATH/node-1.4.18-darwin-arm64"
|
||||
EXEC_START="/root/ceremonyclient/node/node-1.4.18-darwin-arm64"
|
||||
else
|
||||
echo "Unsupported architecture: $ARCH"
|
||||
exit 1
|
||||
@ -39,8 +33,6 @@ fi
|
||||
# Step 3:Re-Create Ceremonyclient Service
|
||||
echo "⏳ Re-Creating Ceremonyclient Service"
|
||||
sleep 2 # Add a 2-second delay
|
||||
|
||||
# Update the ExecStart line in the service file
|
||||
sudo sed -i "s|ExecStart=.*|ExecStart=$EXEC_START|" /lib/systemd/system/ceremonyclient.service
|
||||
|
||||
# Step 4:Start the ceremonyclient service
|
||||
|
||||
Loading…
Reference in New Issue
Block a user