12 lines
No EOL
296 B
Bash
Executable file
12 lines
No EOL
296 B
Bash
Executable file
#!/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 |