uncloud/archive/uncloud_django_based/hacks/command-wrapper.sh

19 lines
290 B
Bash
Raw Normal View History

2020-05-05 13:19:50 +00:00
#!/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 ..."