add database
This commit is contained in:
parent
167aa63dd4
commit
5079bf66cc
|
@ -2,7 +2,7 @@
|
|||
Address = 10.10.11.103/24
|
||||
PrivateKey = qAGUiA1gIa7uvxIUMol0DPYoxp5udMn920qkIT8R0U8=
|
||||
[Peer]
|
||||
PublicKey = w3qegSSuqFTFrGk4XJaWBSwGDOiqbnnAIR9MzwjYVA8=
|
||||
PublicKey = iEVq4lvvKFfqjcoYYyNkA0MS8rcSGaDfPwQGN3C7+D0=
|
||||
Endpoint = 45.158.40.162:18900
|
||||
AllowedIPs= 10.10.11.0/24
|
||||
PersistentKeepalive = 25
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
import sqlite3
|
||||
|
||||
create = sqlite3.connect("db")
|
||||
connect = create.cursor()
|
||||
connect.execute(""" CREATE TABLE IPS
|
||||
(
|
||||
ips text
|
||||
)
|
||||
""")
|
||||
connect.execute(""" CREATE TABLE USERS
|
||||
(
|
||||
users text
|
||||
)
|
||||
""")
|
||||
|
||||
|
||||
create.commit()
|
||||
create.close()
|
||||
|
||||
|
2
gen.sh
2
gen.sh
|
@ -86,7 +86,7 @@ echo -ne '################ (60%)\n'
|
|||
sleep 1
|
||||
echo "Adding peer......";sleep 2
|
||||
echo "[Peer]">>$file_name;
|
||||
echo "PublicKey = w3qegSSuqFTFrGk4XJaWBSwGDOiqbnnAIR9MzwjYVA8=">> $file_name
|
||||
echo "PublicKey = iEVq4lvvKFfqjcoYYyNkA0MS8rcSGaDfPwQGN3C7+D0=">> $file_name
|
||||
echo "Endpoint = 45.158.40.162:18900">> $file_name
|
||||
|
||||
if [ $allow -eq 1 ];then
|
||||
|
|
Loading…
Reference in New Issue