This commit is contained in:
Mateusz779 2023-04-13 13:45:55 +02:00
parent e4d68e1ac6
commit f76fed8ef7

View File

@ -58,46 +58,46 @@ mkdir /tmp/output/ssh
./uVPN_rsagen $keylen > /tmp/output/vpn/uVPN.priv ./uVPN_rsagen $keylen > /tmp/output/vpn/uVPN.priv
head -2 /tmp/output/vpn/uVPN.priv > /tmp/output/vpn/$name.pub head -2 /tmp/output/vpn/uVPN.priv > /tmp/output/vpn/$name.pub
if [ -n "$build" ]; then # if [ -n "$build" ]; then
mv uVPN3 /tmp/output/vpn # mv uVPN3 /tmp/output/vpn
fi # fi
cd $CONFIGS # cd $CONFIGS
cp $conf /tmp/output/vpn # cp $conf /tmp/output/vpn
cp $ini /tmp/output/vpn # cp $ini /tmp/output/vpn
cp $key /tmp/output/vpn # cp $key /tmp/output/vpn
if [ -n "$scripts" ]; then # if [ -n "$scripts" ]; then
cp -r $scripts /tmp/output/vpn # cp -r $scripts /tmp/output/vpn
fi # fi
if [ -n "$akeys" ]; then # if [ -n "$akeys" ]; then
cp $akeys /tmp/output/ssh # cp $akeys /tmp/output/ssh
fi # fi
if [ -n "$sshconf" ]; then # if [ -n "$sshconf" ]; then
cp $sshconf /tmp/output/ssh # cp $sshconf /tmp/output/ssh
fi # fi
mkdir /tmp/output/msmtp # mkdir /tmp/output/msmtp
if [ -n "$msmtp" ]; then # if [ -n "$msmtp" ]; then
cp $msmtp /tmp/output/msmtp # cp $msmtp /tmp/output/msmtp
fi # fi
sed -i '/^private_key/c\private_key uVPN.priv' /tmp/output/vpn/$(basename "$conf") # sed -i '/^private_key/c\private_key uVPN.priv' /tmp/output/vpn/$(basename "$conf")
sed -i '/^name/c\name '"$name" /tmp/output/vpn/$(basename "$conf") # sed -i '/^name/c\name '"$name" /tmp/output/vpn/$(basename "$conf")
sed -i '/^servers_config/c\servers_config '"$(basename "$ini")" /tmp/output/vpn/$(basename "$conf") # sed -i '/^servers_config/c\servers_config '"$(basename "$ini")" /tmp/output/vpn/$(basename "$conf")
sed -i '1s/.*/['"$name"']/' /tmp/output/vpn/$(basename "$ini") # sed -i '1s/.*/['"$name"']/' /tmp/output/vpn/$(basename "$ini")
cd /tmp/output # cd /tmp/output
mkdir configs # mkdir configs
mv * configs # mv * configs
mkdir $CONFIGS/squash # mkdir $CONFIGS/squash
mkdir $CONFIGS/squash/$name # mkdir $CONFIGS/squash/$name
mksquashfs . $CONFIGS/squash/$name.squashfs # mksquashfs . $CONFIGS/squash/$name.squashfs
cp /tmp/output/configs/vpn/$name.pub $CONFIGS/squash/$name.pub # cp /tmp/output/configs/vpn/$name.pub $CONFIGS/squash/$name.pub
echo "$name" # echo "$name"
# rm -rf /tmp/kit-crypto # rm -rf /tmp/kit-crypto
# rm -rf /tmp/uVPN* # rm -rf /tmp/uVPN*