2015-10-15 12:47:10 +00:00
|
|
|
#!/bin/sh
|
2018-09-10 09:27:05 +00:00
|
|
|
|
2015-10-15 12:47:10 +00:00
|
|
|
# `/sbin/setuser www-data` runs the given command as the user `www-data`.
|
2018-09-10 09:27:05 +00:00
|
|
|
RUNAS=`which setuser`
|
|
|
|
[ -z $RUNAS ] && RUNAS="`which sudo` -u"
|
|
|
|
USER=www-data
|
|
|
|
|
|
|
|
DJANGO_PROJECT=/srv/webvirtcloud
|
2020-04-17 11:02:18 +00:00
|
|
|
PYTHON=$DJANGO_PROJECT/venv/bin/python3
|
2018-09-10 09:27:05 +00:00
|
|
|
NOVNCD=$DJANGO_PROJECT/console/novncd
|
|
|
|
|
|
|
|
# make novncd debug, verbose
|
|
|
|
#PARAMS="-d -v"
|
|
|
|
|
|
|
|
LOG=/var/log/novncd.log
|
|
|
|
|
|
|
|
cd $DJANGO_PROJECT
|
|
|
|
exec $RUNAS $USER $PYTHON $NOVNCD $PARAMS >> $LOG 2>&1
|