#!/bin/bash set -e #DEBHELPER# case "$1" in configure) if ! mysql --defaults-file=/etc/alternc/my.cnf -e 'select name from domaines_type where name = "wsgi";' | grep -q 'wsgi' ; then mysql --defaults-file=/etc/alternc/my.cnf -e "INSERT INTO domaines_type (name, description, target, entry, compatibility, enable, only_dns, need_dns, advanced, create_tmpdir, create_targetdir, has_https_option) VALUES ('wsgi', 'Locally hosted (WSGI Python3)', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@', 'txt,defmx,defmx2,mx,mx2', 'ALL', 0, 0, 1, 1, 1, 1), ('wsgi-both', 'WSGI Python3 (HTTP + HTTPS)', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@', 'txt,defmx,defmx2,mx,mx2', 'NONE', 0, 0, 1, 1, 1, 0), ('wsgi-http', 'WSGI Python3 (HTTP)', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@', 'txt,defmx,defmx2,mx,mx2', 'NONE', 0, 0, 1, 1, 1, 0), ('wsgi-https', 'WSGI Python3 (HTTPS)', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@', 'txt,defmx,defmx2,mx,mx2', 'NONE', 0, 0, 1, 1, 1, 0); " fi mysql --defaults-file=/etc/alternc/my.cnf < /usr/share/alternc/install/alternc-wsgi-py3/schema.sql a2enmod wsgi && service apache2 reload ;; esac