1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-26 16:15:25 +00:00
webvirtcloud/conf/runit/novncd.sh

19 lines
442 B
Bash
Raw Normal View History

2015-10-15 12:47:10 +00:00
#!/bin/sh
2015-10-15 12:47:10 +00:00
# `/sbin/setuser www-data` runs the given command as the user `www-data`.
2020-09-25 10:26:17 +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
NOVNCD=$DJANGO_PROJECT/console/novncd
# make novncd debug, verbose
#PARAMS="-d -v"
LOG=/var/log/novncd.log
2020-09-25 10:26:17 +00:00
cd $DJANGO_PROJECT || exit
exec "$RUNAS" "$USER" "$PYTHON" "$NOVNCD" "$PARAMS" >> $LOG 2>&1