This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
install-scripts/deploy-script.sh

17 lines
330 B
Bash
Raw Permalink Normal View History

2020-03-19 19:07:07 +00:00
#!/bin/sh
if [ -z "$1" ] ; then
2020-03-20 20:06:14 +00:00
echo 'deploy-script.sh: Error - Must supply script as argument'
2020-03-19 19:07:07 +00:00
exit
else
_script="$1"
fi
. ./config.sh
2020-03-20 20:06:14 +00:00
cat config.sh "$_script" | ssh root@"$_url" 'cat >/tmp/deploy-script.sh'
2020-03-19 19:07:07 +00:00
ssh root@"$_url" '/bin/bash /tmp/deploy-script.sh'
ssh root@"$_url" '/bin/bash -c "rm /tmp/deploy-script.sh"'