From e5b4fcdf6f874e28fbc5b9f598b389de9a6e9e6f Mon Sep 17 00:00:00 2001 From: Raine Date: Sun, 29 Oct 2023 16:19:27 +0100 Subject: [PATCH] feat: migration tool --- tools/migration/sync-srv.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 tools/migration/sync-srv.sh diff --git a/tools/migration/sync-srv.sh b/tools/migration/sync-srv.sh new file mode 100755 index 0000000..4943e8a --- /dev/null +++ b/tools/migration/sync-srv.sh @@ -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 \ No newline at end of file