uncloud/uncloud_django_based/hacks/command-wrapper.sh
Nico Schottelius 594f1a9b69 +hacks
2020-05-05 15:19:50 +02:00

18 lines
290 B
Bash

#!/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 ..."