From 594f1a9b69016ad3d02bcf3fe1cc65761c513a8e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 May 2020 15:19:50 +0200 Subject: [PATCH] +hacks --- uncloud_django_based/{ => hacks}/abk-hacks.py | 0 .../{ => hacks}/abkhack/opennebula_hacks.py | 0 uncloud_django_based/hacks/command-wrapper.sh | 18 ++++++++++++++++++ 3 files changed, 18 insertions(+) rename uncloud_django_based/{ => hacks}/abk-hacks.py (100%) rename uncloud_django_based/{ => hacks}/abkhack/opennebula_hacks.py (100%) create mode 100644 uncloud_django_based/hacks/command-wrapper.sh diff --git a/uncloud_django_based/abk-hacks.py b/uncloud_django_based/hacks/abk-hacks.py similarity index 100% rename from uncloud_django_based/abk-hacks.py rename to uncloud_django_based/hacks/abk-hacks.py diff --git a/uncloud_django_based/abkhack/opennebula_hacks.py b/uncloud_django_based/hacks/abkhack/opennebula_hacks.py similarity index 100% rename from uncloud_django_based/abkhack/opennebula_hacks.py rename to uncloud_django_based/hacks/abkhack/opennebula_hacks.py diff --git a/uncloud_django_based/hacks/command-wrapper.sh b/uncloud_django_based/hacks/command-wrapper.sh new file mode 100644 index 0000000..d6ddd13 --- /dev/null +++ b/uncloud_django_based/hacks/command-wrapper.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +dbhost=$1; shift + +ssh -L5432:localhost:5432 "$dbhost" & + +python manage.py "$@" + + + +# command only needs to be active while manage command is running + +# -T no pseudo terminal + + +# alternatively: commands output shell code + +# ssh uncloud@dbhost "python manage.py --hostname xxx ..."