blob: d960bb8b263f9f9a66bcc1eee5944894acffc492 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
post_install() {
login='webvirtcloud'
getent passwd "${login}" > /dev/null || useradd -r -U -d "/var/lib/${login}" "${login}" -m > /dev/null
PYTHONPATH=/usr/lib/webvirtcloud/lib /usr/bin/python2 /usr/lib/webvirtcloud/manage.py migrate --run-syncdb --noinput
chown webvirtcloud:webvirtcloud /usr/lib/webvirtcloud/db.sqlite3 /usr/lib/webvirtcloud
PYTHONPATH=/usr/lib/webvirtcloud/lib /usr/bin/python2 /usr/lib/webvirtcloud/manage.py collectstatic --noinput
cat <<- EOF
If you want to change admin, you need to run:
# PYTHONPATH=/usr/lib/webvirtcloud/lib /usr/bin/python2 /usr/lib/webvirtcloud/manage.py createsuperuser
WebVirtCloud daemon is managed by Supervisord.
# sudo systemctl restart supervisord
Port info
WebVirtCloud : 8006
NoVNC : 6080
Sample nginx conf file stored in /etc/nginx/conf.d/webvirtcloud.nginx.conf.sample
EOF
}
post_upgrade() {
PYTHONPATH=/usr/lib/webvirtcloud/lib /usr/bin/python2 /usr/lib/webvirtcloud/manage.py migrate --run-syncdb --noinput
chown webvirtcloud:webvirtcloud /usr/lib/webvirtcloud/db.sqlite3 /usr/lib/webvirtcloud
}
|