This commit is contained in:
Mateusz779 2023-04-07 09:46:07 +02:00
parent dafe77ef81
commit c07f99a166
2 changed files with 5 additions and 5 deletions

2
app.py
View File

@ -4,4 +4,4 @@ app = Flask(__name__)
@app.route("/api/getvpn") @app.route("/api/getvpn")
def hello_world(): def hello_world():
return send_file("praktyki.squashfs") return send_file("configs/squash/praktyki.squashfs")

View File

@ -53,8 +53,7 @@ cd $CONFIGS
cp $conf /tmp/output cp $conf /tmp/output
cp $ini /tmp/output cp $ini /tmp/output
cp $key /tmp/output cp $key /tmp/output
if [ "$scripts" ]; then if [ -n "$scripts" ]; then
echo "Podano parametr."
cp -r $scripts /tmp/output/ cp -r $scripts /tmp/output/
fi fi
sed -i '/^private_key/c\private_key uVPN.priv' /tmp/output/$conf sed -i '/^private_key/c\private_key uVPN.priv' /tmp/output/$conf
@ -65,7 +64,8 @@ sed -i '1s/.*/['"$name"']/' /tmp/output/$ini
cd /tmp/output cd /tmp/output
mkdir vpn mkdir vpn
mv * vpn mv * vpn
mkdir $CONFIGS/squash/$name mkdir -t $CONFIGS/squash
mkdir -t $CONFIGS/squash/$name
mksquashfs . $CONFIGS/squash/$name.squashfs mksquashfs . $CONFIGS/squash/$name.squashfs
cp /tmp/output/vpn/$name.pub $CONFIGS/squash/$name cp /tmp/output/vpn/$name.pub $CONFIGS/squash/$name