Compare commits
2 Commits
6f06eba56e
...
20075ec132
Author | SHA1 | Date |
---|---|---|
Ray Elliott | 20075ec132 | |
Ray Elliott | 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
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
apt upgrade || exit 10
|
||||
apt install -y tmux ufw || exit 15
|
||||
|
||||
ufw allow ssh || exit 20
|
||||
ufw enable
|
||||
yes | ufw enable
|
||||
|
|
Loading…
Reference in New Issue