Codebase list python-faraday / edc3903
Migrate database if upgrade Sophie Brun 5 years ago
3 changed file(s) with 20 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 #!/bin/sh
1
2 migrate() {
3 if su postgres -c "psql -lqt" | cut -d \| -f 1 | grep -qw faraday; then
4 cd /usr/share/python-faraday
5 python manage.py migrate
6 fi
7 }
8
9 if [ "$(systemctl is-active postgresql)" = "active" ]; then
10 migrate
11 else
12 systemctl start postgresql
13 migrate
14 systemctl stop postgresql
15 fi
1818 faraday-terminal.zsh usr/share/python-faraday/
1919 debian/helper-script/* usr/bin/
2020 VERSION usr/share/python-faraday/
21 debian/migrate-database usr/share/python-faraday/debian-scripts
88 rm -rf /usr/share/python-faraday/shell
99 rm -f /usr/share/python-faraday/external_libs
1010 fi
11 if [ "$1" = "configure" ] && [ -n "$2" ]; then
12 ./usr/share/python-faraday/debian-scripts/migrate-database
13 fi
1114
1215 #DEBHELPER#