feat: migration tool
This commit is contained in:
parent
460bccec1c
commit
e5b4fcdf6f
1 changed files with 12 additions and 0 deletions
12
tools/migration/sync-srv.sh
Executable file
12
tools/migration/sync-srv.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if ! [ "$(id -u)" = "0" ]; then
|
||||||
|
echo "please perform as root, attempting to escalate privileges..."
|
||||||
|
exec sudo $(cat /proc/$$/cmdline | sed 's/\x00/ /g')
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
for service in $@; do
|
||||||
|
echo "syncing $service..."
|
||||||
|
rsync -avz root@neo.ixvd.net:/srv/$service /srv
|
||||||
|
done
|
Loading…
Reference in a new issue