You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto install fails because of a bug on line 1109 - it should be && not single &. The single & puts the whole command on background and the following cd command fails.
Expected behavior
Pivpn is installed.
Screenshots
If applicable, add screenshots to help explain your problem.
Can you replicate the issue? Describe the steps below
Use the following cloud-init script to install the thing on any Ubuntu server (I used Hetzner Cloud):
#!/bin/bash# configure these according to your cloud infra
vpn_user=vpn
public_if=eth0
private_if=enp7s0
dns1=9.9.9.9
dns2=149.112.112.112
# this will be the address clients connect to. Must be public ip address or DNS name mapped to it
host_dns=$public_addr_v4
adduser -q -gecos '' --disabled-password $vpn_user
usermod -G sudo $vpn_user
sed -i -E 's/^%sudo.+$/%sudo ALL=(ALL:ALL) NOPASSWD:ALL/' /etc/sudoers
# some things we can get automatically
public_addr_v4=$(ip -4 -o addr | grep $public_if| grep global | awk '{print $4}'| cut -d '/' -f 1)
public_addr_v6=$(ip -6 -o addr | grep $public_if| grep global | awk '{print $4}'| cut -d '/' -f 1)
private_addr_v4=$(ip -4 -o addr | grep $private_if| grep global | awk '{print $4}'| cut -d '/' -f 1)
private_addr_v6=$(ip -6 -o addr | grep $private_if| grep global | awk '{print $4}'| cut -d '/' -f 1)
os=$(lsb_release -is)
os_codename=$(lsb_release -cs)
cat <<EOF > /home/vpn/wg-vpn.confPLAT=$osOSCN=$os_codenameUSING_UFW=0IPv4dev=$public_ifIPv6dev=$public_ifinstall_user=$vpn_userinstall_home=/home/$vpn_userVPN=wireguardpivpnPORT=51820pivpnDNS1=$dns1pivpnDNS2=$dns2pivpnHOST=$host_dnsINPUT_CHAIN_EDITED=0FORWARD_CHAIN_EDITED=0INPUT_CHAIN_EDITEDv6=0FORWARD_CHAIN_EDITEDv6=0pivpnPROTO=udppivpnMTU=1420pivpnDEV=wg0pivpnNET=10.211.97.0subnetClass=24pivpnenableipv6=1pivpnNETv6="fd11:5ee:bad:c0de::"subnetClassv6=64ALLOWED_IPS="0.0.0.0/0, ::0/0"UNATTUPG=1EOF
chown $vpn_user:$vpn_user /home/$vpn_user/wg-vpn.conf
apt-get update
apt-get upgrade -y
mkdir /home/$vpn_user/.ssh
cp ~/.ssh/authorized_keys /home/$vpn_user/.ssh/
chmod 0700 /home/$vpn_user/.ssh
chmod 0600 /home/$vpn_user/.ssh/authorized_keys
chown -R $vpn_user:$vpn_user /home/$vpn_user/.ssh
git clone https://github.com/pivpn/pivpn /home/vpn/pivpn
chown -R $vpn_user:$vpn_user /home/$vpn_user/pivpn
try=5
while [ $try-gt 0 ];do
try=$(($try-1))
su -l -c "/home/$vpn_user/pivpn/auto_install/install.sh --unattended /home/$vpn_user/wg-vpn.conf" - $vpn_userif [ $?-eq 0 ];then
try=0
elseecho"error. trying again. $try tries left"
sleep 2
fidoneif [ $try-ne 0 ];thenecho"install successful, rebooting in 5 seconds"
sleep 5
reboot
elseecho"installation failed after 5 retries, plz see cloud-init logs for details"fi
Have you searched for similar issues and solutions?
Yes. No solution because it is not related to octopi.
Additional context
N/A
Have you taken any steps towards solving your issue?
Yes, changing line 1109 from single & at then end to && solves the problem.
In raising this issue, I confirm the following:
{please fill the checkboxes, e.g: [X]}
Has your install failed?
Describe the issue
Auto install fails because of a bug on line 1109 - it should be
&&
not single&
. The single&
puts the whole command on background and the followingcd
command fails.Expected behavior
Pivpn is installed.
Screenshots
If applicable, add screenshots to help explain your problem.
Can you replicate the issue? Describe the steps below
Use the following cloud-init script to install the thing on any Ubuntu server (I used Hetzner Cloud):
Have you searched for similar issues and solutions?
Yes. No solution because it is not related to octopi.
Additional context
N/A
Have you taken any steps towards solving your issue?
Yes, changing line 1109 from single
&
at then end to&&
solves the problem.Please provide your system information
What type of hardware are you running PiVPN at?
Output of
uname -a
Output of
cat /etc/os-release
If install failed Please provide the console output of
curl -L https://install.pivpn.io | bash
The text was updated successfully, but these errors were encountered: