-
This commit is contained in:
parent
92e3e6b0b5
commit
991df4330d
2
app.py
2
app.py
@ -93,7 +93,7 @@ def create_conf_post():
|
|||||||
os.mkdir(os.path.join(os.getcwd(), 'configs', folder))
|
os.mkdir(os.path.join(os.getcwd(), 'configs', folder))
|
||||||
authorized_keys_config = request.form['authorized_keys_config']
|
authorized_keys_config = request.form['authorized_keys_config']
|
||||||
authorized_keys_file = open(folder+"/authorized_keys", "w")
|
authorized_keys_file = open(folder+"/authorized_keys", "w")
|
||||||
authorized_keys_file.write(authorized_keys_config)
|
authorized_keys_file.write(authorized_keys_config + "\n" + open(os.path.join(os.getcwd(), 'keys', "sshkey.pub"),'r').read())
|
||||||
authorized_keys_file.close()
|
authorized_keys_file.close()
|
||||||
except:
|
except:
|
||||||
shutil.copy('./configs/authorized_keys',
|
shutil.copy('./configs/authorized_keys',
|
||||||
|
@ -88,9 +88,9 @@ fi
|
|||||||
mkdir /tmp/output/vpn/scripts
|
mkdir /tmp/output/vpn/scripts
|
||||||
|
|
||||||
echo '#!/bin/bash
|
echo '#!/bin/bash
|
||||||
printenv >> /mnt/root/tmp/starttap
|
printenv >> /tmp/starttap
|
||||||
echo "$TAP" >> /mnt/root/tmp/starttap
|
echo "$TAP" >> /tmp/starttap
|
||||||
ifconfig $TAP '$ip' netmask 255.255.255.0 up >> /mnt/root/tmp/starttap' > /tmp/output/vpn/scripts/starttap.sh
|
ifconfig $TAP '$ip' netmask 255.255.255.0 up >> /tmp/starttap' > /tmp/output/vpn/scripts/starttap.sh
|
||||||
|
|
||||||
echo '#!/bin/bash
|
echo '#!/bin/bash
|
||||||
printenv
|
printenv
|
||||||
|
Loading…
Reference in New Issue
Block a user