Files
simplex-chat/scripts/stress-test-linode.sh
T
Efim Poberezkin 7669bd59f1 fix linode script
2022-02-17 12:49:30 +04:00

37 lines
820 B
Bash

#!/bin/bash
# Log all stdout output to stackscript.log
exec &> >(tee -i /var/log/stackscript.log)
# Uncomment next line to enable debugging features
# set -xeo pipefail
cd $HOME
# Download stress test binary
binary="$HOME/simplex-stress-test"
curl -L -o binary https://github.com/simplex-chat/simplex-chat/releases/download/v1.2.1/simplex-stress-test
chmod +x binary
# / Create systemd service
cat <<EOT >> /etc/systemd/system/simplex-stress-test.service
[Unit]
Description=SMP server stress test
[Service]
Type=simple
ExecStart=/bin/sh -c "$binary"
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
EOT
# Create systemd service /
# Start systemd service
chmod 644 /etc/systemd/system/simplex-stress-test.service
sudo systemctl enable simplex-stress-test
sudo systemctl start simplex-stress-test