Browse Source
* Shared-keys are now per-peer basis and not global. They also reflect on the server config...pull/5/head
Per-Arne
5 years ago
21 changed files with 132 additions and 41 deletions
@ -0,0 +1,5 @@ |
|||||
|
#!/usr/bin/env bash |
||||
|
docker login |
||||
|
|
||||
|
docker build -t perara/wg-manager . |
||||
|
docker push perara/wg-manager |
@ -0,0 +1,17 @@ |
|||||
|
from sqlalchemy import Table, MetaData, String, Column, Text |
||||
|
|
||||
|
|
||||
|
def upgrade(migrate_engine): |
||||
|
try: |
||||
|
meta = MetaData(bind=migrate_engine) |
||||
|
account = Table('peer', meta, autoload=True) |
||||
|
dns = Column('dns', Text) |
||||
|
dns.create(account) |
||||
|
except: |
||||
|
pass |
||||
|
|
||||
|
|
||||
|
def downgrade(migrate_engine): |
||||
|
meta = MetaData(bind=migrate_engine) |
||||
|
dns = Table('peer', meta, autoload=True) |
||||
|
dns.c.email.drop() |
@ -0,0 +1,16 @@ |
|||||
|
from sqlalchemy import * |
||||
|
from migrate import * |
||||
|
|
||||
|
|
||||
|
def upgrade(migrate_engine): |
||||
|
meta = MetaData(bind=migrate_engine) |
||||
|
server = Table('server', meta, autoload=True) |
||||
|
server.c.shared_key.drop() |
||||
|
|
||||
|
|
||||
|
def downgrade(migrate_engine): |
||||
|
meta = MetaData(bind=migrate_engine) |
||||
|
account = Table('server', meta, autoload=True) |
||||
|
shared_key = Column('shared_key', Text) |
||||
|
shared_key.create(account) |
||||
|
|
@ -0,0 +1,19 @@ |
|||||
|
from sqlalchemy import * |
||||
|
from migrate import * |
||||
|
|
||||
|
|
||||
|
def upgrade(migrate_engine): |
||||
|
try: |
||||
|
meta = MetaData(bind=migrate_engine) |
||||
|
peer = Table('peer', meta, autoload=True) |
||||
|
shared_key = Column('shared_key', Text) |
||||
|
shared_key.create(peer) |
||||
|
except: |
||||
|
pass |
||||
|
|
||||
|
|
||||
|
def downgrade(migrate_engine): |
||||
|
meta = MetaData(bind=migrate_engine) |
||||
|
dns = Table('peer', meta, autoload=True) |
||||
|
dns.c.shared_key.drop() |
||||
|
|
Loading…
Reference in new issue