summarylogtreecommitdiffstats
path: root/webvirt-api-git.install
blob: 59cf95bc21ef876d1f64001aeca8b55a105e2beb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

post_install() {
  cd /usr/lib/webvirt_api
  virtualenv -p python /usr/lib/webvirt_api/venv
  source /usr/lib/webvirt_api/venv/bin/activate
  poetry install
  python manage.py migrate
  python manage.py collectstatic --noinput
  chown -R webvirt:webvirt /usr/lib/webvirt_api
}

post_upgrade() {
  post_install $1
}
 
op=$1
shift
 
$op $*