mirror of
https://github.com/retspen/webvirtcloud
synced 2024-10-31 19:44:16 +00:00
update novncd runit script, make it debian compatible, update docs
This commit is contained in:
parent
6486c20168
commit
01c7991d80
2 changed files with 27 additions and 2 deletions
11
README.md
11
README.md
|
@ -213,6 +213,17 @@ Done!!
|
|||
|
||||
Go to http://serverip and you should see the login screen.
|
||||
|
||||
### Alternative running novncd via runit
|
||||
Alternative to running nonvcd via supervisor is runit.
|
||||
|
||||
On Debian systems install runit and configure novncd service
|
||||
```
|
||||
apt install runit runit-systemd
|
||||
mkdir /etc/service/novncd/
|
||||
ln -s /srv/webvirtcloud/conf/runit/novncd.sh /etc/service/novncd/run
|
||||
systemctl start runit.service
|
||||
```
|
||||
|
||||
### Default credentials
|
||||
<pre>
|
||||
login: admin
|
||||
|
|
|
@ -1,4 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
# `/sbin/setuser www-data` runs the given command as the user `www-data`.
|
||||
cd /srv/webvirtcloud
|
||||
exec /sbin/setuser www-data /srv/webvirtcloud/venv/bin/python /srv/webvirtcloud/console/novncd >> /var/log/novncd.log 2>&1
|
||||
RUNAS=`which setuser`
|
||||
[ -z $RUNAS ] && RUNAS="`which sudo` -u"
|
||||
USER=www-data
|
||||
|
||||
DJANGO_PROJECT=/srv/webvirtcloud
|
||||
PYTHON=$DJANGO_PROJECT/venv/bin/python
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue