diff --git a/scripts/smp-server-linode.sh b/scripts/smp-server-linode.sh index 2e4b89c2d..3bcbcede5 100644 --- a/scripts/smp-server-linode.sh +++ b/scripts/smp-server-linode.sh @@ -52,12 +52,12 @@ curl -L -o $binary https://github.com/simplex-chat/simplexmq/releases/latest/dow chmod +x $binary # / Add to PATH -cat <> /etc/profile.d/simplex.sh +cat > /etc/profile.d/simplex.sh << EOF #!/bin/bash export PATH="$PATH:$bin_dir" -EOT +EOF # Add to PATH / # Source and test PATH @@ -94,13 +94,13 @@ fi on_login_script="/opt/simplex/on_login.sh" # / Welcome script -cat <> $on_login_script +cat > $on_login_script << EOF #!/bin/bash fingerprint=\$1 server_address=\$2 -cat <> /etc/systemd/system/smp-server.service +cat > /etc/systemd/system/smp-server.service << EOF [Unit] -Description=SMP server systemd service +Description=SMP server [Service] Type=simple -ExecStart=/bin/sh -c "exec /opt/simplex/bin/smp-server start >> /var/opt/simplex/smp-server.log 2>&1" +ExecStart=/bin/sh -c "exec $binary start >> /var/opt/simplex/smp-server.log 2>&1" [Install] WantedBy=multi-user.target -EOT +EOF # Create systemd service / # Start systemd service