mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-25 23:55:24 +00:00
Compare commits
3 commits
45be006694
...
6d97557cd9
Author | SHA1 | Date | |
---|---|---|---|
|
6d97557cd9 | ||
|
950e668631 | ||
|
46029d533c |
7 changed files with 112 additions and 0 deletions
15
conf/systemd/README.md
Normal file
15
conf/systemd/README.md
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# Ubuntu Service Files
|
||||||
|
|
||||||
|
I choose to install this service on Ubuntu 22.04
|
||||||
|
|
||||||
|
The process is not fully documented but I wanted to contribute the service files
|
||||||
|
|
||||||
|
The file webvirt is beeing installed into /etc/default/webvirt and allows you to easily change the location of the webvirtcloud installation path
|
||||||
|
|
||||||
|
The PATH variable being set for these services includes /usr/bin which contains the ssh executable. That is being used by webvirt-cloud and webvirt-novncd
|
||||||
|
|
||||||
|
Should the executable be located in another location please adjust the path
|
||||||
|
|
||||||
|
The error you should be seeing is "ssh executable not found"
|
||||||
|
|
||||||
|
|
7
conf/systemd/install.sh
Executable file
7
conf/systemd/install.sh
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
FILEPATH=$(readlink -f "$0");
|
||||||
|
SCRIPTPATH=$(dirname "$FILEPATH");
|
||||||
|
cd "$SCRIPTPATH"
|
||||||
|
cp webvirt-* /lib/systemd/system/
|
||||||
|
cp webvirt /etc/default/
|
||||||
|
echo Run to start services \"systemctl daemon-reload\; systemctl enable --now $(ls webvirt-* | tr "\n" " ")\"
|
2
conf/systemd/webvirt
Normal file
2
conf/systemd/webvirt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
WEBVIRT_PATH="/srv/webvirtcloud"
|
||||||
|
PATH="$WEBVIRT_PATH/venv/bin:/usr/bin"
|
23
conf/systemd/webvirt-cloud.service
Normal file
23
conf/systemd/webvirt-cloud.service
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Webvirt Cloud Webinterface
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=10
|
||||||
|
User=www-data
|
||||||
|
Group=www-data
|
||||||
|
LimitNOFILE=64000
|
||||||
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||||
|
EnvironmentFile=/etc/default/webvirt
|
||||||
|
|
||||||
|
ExecStart=/bin/bash -c "cd ${WEBVIRT_PATH};${WEBVIRT_PATH}/venv/bin/gunicorn webvirtcloud.wsgi:application -c ${WEBVIRT_PATH}/gunicorn.conf.py"
|
||||||
|
|
||||||
|
# Make sure stderr/stdout is captured in the systemd journal.
|
||||||
|
StandardOutput=journal
|
||||||
|
StandardError=journal
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
19
conf/systemd/webvirt-gstfsd.service
Normal file
19
conf/systemd/webvirt-gstfsd.service
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Webvirt Cloud GSTFSD
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=10
|
||||||
|
LimitNOFILE=64000
|
||||||
|
|
||||||
|
ExecStart=/usr/bin/python3 /usr/local/bin/gstfsd
|
||||||
|
|
||||||
|
# Make sure stderr/stdout is captured in the systemd journal.
|
||||||
|
StandardOutput=journal
|
||||||
|
StandardError=journal
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
23
conf/systemd/webvirt-novncd.service
Normal file
23
conf/systemd/webvirt-novncd.service
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Webvirt Cloud NOVNCD
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=10
|
||||||
|
User=www-data
|
||||||
|
Group=www-data
|
||||||
|
LimitNOFILE=64000
|
||||||
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||||
|
EnvironmentFile=/etc/default/webvirt
|
||||||
|
|
||||||
|
ExecStart=/bin/bash -c "cd ${WEBVIRT_PATH};${WEBVIRT_PATH}/venv/bin/python3 ${WEBVIRT_PATH}/console/novncd"
|
||||||
|
|
||||||
|
# Make sure stderr/stdout is captured in the systemd journal.
|
||||||
|
StandardOutput=journal
|
||||||
|
StandardError=journal
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
23
conf/systemd/webvirt-socketiod.service
Normal file
23
conf/systemd/webvirt-socketiod.service
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Webvirt Cloud NOVNCD
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=10
|
||||||
|
User=www-data
|
||||||
|
Group=www-data
|
||||||
|
LimitNOFILE=64000
|
||||||
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||||
|
EnvironmentFile=/etc/default/webvirt
|
||||||
|
|
||||||
|
ExecStart=/bin/bash -c "cd ${WEBVIRT_PATH};${WEBVIRT_PATH}/venv/bin/python3 ${WEBVIRT_PATH}/console/socketiod -d"
|
||||||
|
|
||||||
|
# Make sure stderr/stdout is captured in the systemd journal.
|
||||||
|
StandardOutput=journal
|
||||||
|
StandardError=journal
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in a new issue