+hacks
This commit is contained in:
parent
e3b28354fe
commit
594f1a9b69
3 changed files with 18 additions and 0 deletions
18
uncloud_django_based/hacks/command-wrapper.sh
Normal file
18
uncloud_django_based/hacks/command-wrapper.sh
Normal file
|
@ -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 ..."
|
Loading…
Reference in a new issue