Skip to content

Commit

Permalink
Added script to generate systemd service file
Browse files Browse the repository at this point in the history
It is needed for automatic server startup on test machines and VMs
used in automated tests.
  • Loading branch information
gshimansky committed Nov 8, 2018
1 parent d815d2f commit b07022f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions install-systemd-service.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && pwd)"

sudo sh -c "cat > /lib/systemd/system/httpperfserv.service <<EOF
[Unit]
Description=Benchmark http server
After=network.target nss-lookup.target
Documentation=https://github.com/vsukhoml/httpperfserv
[Service]
Type=simple
ExecStart=${DIR}/httpperfserv
[Install]
WantedBy=multi-user.target
EOF"

sudo systemctl daemon-reload
sudo systemctl enable httpperfserv.service
sudo systemctl start httpperfserv.service

0 comments on commit b07022f

Please sign in to comment.