17 lines
330 B
Bash
Executable File
17 lines
330 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ -z "$1" ] ; then
|
|
echo "deploy-script.sh: Error - Must supply script as argument"
|
|
exit
|
|
else
|
|
_script="$1"
|
|
fi
|
|
|
|
. ./config.sh
|
|
|
|
cat config.sh "$_script" | ssh root@"$_url" "cat >/tmp/deploy-script.sh"
|
|
ssh root@"$_url" '/bin/bash /tmp/deploy-script.sh'
|
|
ssh root@"$_url" '/bin/bash -c "rm /tmp/deploy-script.sh"'
|
|
|
|
|