home · contact · privacy
Fix.
[config] / buster / setup_scripts / migrate_app.sh
index 6e18f330e89eb5febf4c69302997a768fb13f33f..f06b156fb2016b67b2157843768971e46937900d 100755 (executable)
@@ -12,12 +12,15 @@ if [ ! "$2" = "pleroma_otp" ] && [ ! "$2" = "pleroma_source" ] && [ ! "$2" = "pe
 fi
 server_ip="$1"
 app="$2"
+service="$2"
 if [ "${app}" = "pleroma_otp" ]; then
     db_name="pleroma"
     dirs="/var/lib/pleroma/uploads /etc/pleroma"
-if [ "${app}" = "pleroma_source" ]; then
+    service=pleroma
+elif [ "${app}" = "pleroma_source" ]; then
     db_name="pleroma"
     dirs="/var/lib/pleroma/uploads /opt/pleroma/config"
+    service=pleroma
 elif [ "${app}" = "peertube" ]; then
     db_name="peertube_prod"
     dirs="/var/www/peertube/storage /var/www/peertube/config"
@@ -31,6 +34,6 @@ cd "${setup_scripts_dir}"
 read -p'Hit Enter when you are done.' ignore
 eval $(ssh-agent) && ssh-add
 echo 'Enter password for root on target server next.'
-ssh plom@"${server_ip}" "su -lc \"cd config/buster/setup_scripts && git pull && ./backup_app.sh ${app} ${db_name} ${dirs}\""
+ssh plom@"${server_ip}" "su -lc \"cd config/buster/setup_scripts && git pull && ./backup_app.sh ${service} ${db_name} ${dirs}\""
 scp plom@"${server_ip}":~/${app}_backup.tar /home/plom/${app}_backup.tar
 ./restore_app.sh "${app}" "${db_name}"