Commit 6dccd4d1 authored by Gero Müller's avatar Gero Müller
Browse files

small fixes

parent 0498bafa
......@@ -201,6 +201,7 @@ fi
#/srv/venv/bin/pip install --upgrade pip
#/srv/venv/bin/pip install --upgrade -r /srv/vispa/requirements.txt
/srv/venv/bin/pip install --upgrade pymysql
/srv/venv/bin/pip install --upgrade https://github.com/tomerfiliba/rpyc/archive/master.zip
/srv/venv/bin/python /srv/vispa/setup.py develop
mkdir -p /etc/vispa
......@@ -225,7 +226,7 @@ sqlalchemy.max_overflow = 50
[alembic]
use_alembic = True
# inplace installation
#script_location = vispa/models/alembic
script_location = vispa/models/alembic
# global installation
#script_location = vispa:models/alembic
auto_migrate = True
......@@ -241,6 +242,7 @@ password = zehdjkamam
user_base = ou=people,dc=vispa,dc=local
group_base = ou=group,dc=vispa,dc=local
sync_on_startup = False
private_group = True
[websockets]
enabled = True
......@@ -273,6 +275,17 @@ WantedBy=multi-user.target
EOF
# ----------------------------------------------------------------------
# setup database
# ----------------------------------------------------------------------
cd /srv/vispa
/srv/venv/bin/alembic -c /etc/vispa/vispa.ini upgrade head
/srv/venv/bin/alembic -c /etc/vispa/vispa.ini current
echo "delete from workspace where user_id is null;" | mysql vispa
echo "insert into workspace (user_id, name, host, auto_connect, login_credentials) values (null, 'vispa.local', 'localhost', 1, 1);" | mysql vispa
# ----------------------------------------------------------------------
# enable service
# ----------------------------------------------------------------------
......@@ -285,8 +298,6 @@ systemctl start vispa
#echo "delete from workspace where user_id is null;" | sqlite3 /var/lib/vispa/vispa.db
#echo "insert into workspace (user_id, name, host, auto_connect, login_credentials) values (null, 'vispa.local', 'localhost', 1, 1);" | sqlite3 /var/lib/vispa/vispa.db
#apt -y install sqlite3
echo "delete from workspace where user_id is null;" | mysql vispa
echo "insert into workspace (user_id, name, host, auto_connect, login_credentials) values (null, 'vispa.local', 'localhost', 1, 1);" | mysql vispa
# ----------------------------------------------------------------------
......
......@@ -159,7 +159,10 @@ class LDAPExportExtension(AbstractExtension):
change = {
'memberUid': [(ldap3.MODIFY_ADD, [username])],
}
self.connection.modify(dn, change)
try:
self.connection.modify(dn, change)
except ldap3.LDAPAttributeOrValueExistsResult:
pass
def user_set_password(self, user):
dn = 'cn=%s,%s' % (unicode(user.name), self.user_base)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment