vidforward: remove run_script from create_service.sh

We no longer use a run script; the vidforward executable is started
directly from the service.
This commit is contained in:
Saxon Nelson-Milton 2023-09-20 21:59:35 +00:00
parent 79d3e7280b
commit 4587f31c42
1 changed files with 2 additions and 8 deletions

View File

@ -3,17 +3,13 @@
# service lines are stored in a string allowing us to substitute the GOPATH into
# the ExecStart path of the service file.
if [ $# -ne 2 ]; then
if [ $# -ne 1 ]; then
echo "incorrect number of arguments, expected run script and binary directories"
exit 1
fi
# This corresponds to the path, relative to the GOPATH, of the run script that
# will be used by the service e.g. "/src/bitbucket.org/ausocean/av/cmd/vidforward/run.sh"
run_script_dir=$1
# This corresponds to the binary dir. e.g. /src/bitbucket.org/ausocean/av/cmd/vidforward.
bin_dir=$2
bin_dir=$1
# This is the IP we'll run the host on.
host=$(hostname -I | awk '{print $1}')
@ -30,8 +26,6 @@ gopath_user=${arr_in[1]}
# We can now form the gopath from the obtained user.
gopath="/home/$gopath_user/go"
echo "$gopath$run_script_dir $gopath_user $bin_dir $host"
# Here are the lines that will go into the rv.service file. We'll set the
# ExecStart field as the GOPATH we've obtained + the passed run script dir.
service="