mirror of
https://github.com/retspen/webvirtcloud
synced 2024-11-01 12:04:15 +00:00
18 lines
442 B
Bash
Executable file
18 lines
442 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# `/sbin/setuser www-data` runs the given command as the user `www-data`.
|
|
RUNAS=$(which setuser)
|
|
[ -z "$RUNAS" ] && RUNAS="$(which sudo) -u"
|
|
USER=www-data
|
|
|
|
DJANGO_PROJECT=/srv/webvirtcloud
|
|
PYTHON=$DJANGO_PROJECT/venv/bin/python3
|
|
NOVNCD=$DJANGO_PROJECT/console/novncd
|
|
|
|
# make novncd debug, verbose
|
|
#PARAMS="-d -v"
|
|
|
|
LOG=/var/log/novncd.log
|
|
|
|
cd $DJANGO_PROJECT || exit
|
|
exec "$RUNAS" "$USER" "$PYTHON" "$NOVNCD" "$PARAMS" >> $LOG 2>&1
|