update
This commit is contained in:
parent
6f06eba56e
commit
87392bb0d9
|
@ -0,0 +1,2 @@
|
|||
config
|
||||
config-urls
|
10
README.md
10
README.md
|
@ -2,5 +2,11 @@ All scripts require an argument to specify 'local' or 'remote'.
|
|||
|
||||
If none given script will exit.
|
||||
|
||||
Scripts that operate on local/remote servers simultaneously (e.g,
|
||||
`wp-duplicarte.sh`) do not require this argument.sh
|
||||
Using 'local' will
|
||||
set the source server URL to `$local_url`.
|
||||
set the destination server URL to `$remote_url`.
|
||||
|
||||
Using 'remote' will
|
||||
set the source server URL to `$remote_url`.
|
||||
set the destination server URL to `$local_url`.
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
export local_url=''
|
||||
export remote_url=''
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
. ./config-urls
|
||||
|
||||
if [ "$1" = 'local' ] ; then
|
||||
( export local_url="$local_url"; \
|
||||
export remote_url="$remote_url"; \
|
||||
cat config "$2" \
|
||||
) | ssh root@"$local_url" -T /bin/sh
|
||||
elif [ "$1" = 'remote' ] ; then
|
||||
( export local_url="$remote_url"; \
|
||||
export remote_url="$local_url"; \
|
||||
cat config "$2" \
|
||||
) | ssh root@"$remote_url" -T /bin/sh
|
||||
else
|
||||
echo "error: must specify local or remote"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue