pivpn/pivpn

/opt/pivpn never created during install

TarekHC opened this issue · 5 comments

In raising this issue, I confirm the following:

{please fill the checkboxes, e.g: [X]}

Has your install failed?

no

Describe the issue

Folder /opt/pivpn does not exist after install.

Expected behavior
I expected pivpn add to work. It doesn't. I have tested in the installation process both wg and ovpn.

Can you replicate the issue? Describe the steps below

Steps to reproduce the behavior: (steps above)

Have you searched for similar issues and solutions?

yes

Additional context
This is an old RP I had laying around, and I decided to re-use it as a VPN server after many years of no use. Couple of years ago it used to work like a charm.

Have you taken any steps towards solving your issue?

  which?

Followed several installation approaches (as super user, or following the different methods listed here.
Also followed the suggestions listed here.
Cannot find anywhere people having no /opt/pivpn folder at all.

Please provide your system information

What type of hardware are you running PiVPN at?

Raspberry Pi 3 Model B Rev 1.2

Output of uname -a

Linux raspberrypi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux

Output of cat /etc/os-release

PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

If install failed Please provide the console output of curl -L https://install.pivpn.io | bash

Same as below.

Console output of curl -L install.pivpn.io | bash

root@raspberrypi:/# curl -L install.pivpn.io | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    17  100    17    0     0     70      0 --:--:-- --:--:-- --:--:--    70
100   162  100   162    0     0    296      0 --:--:-- --:--:-- --:--:--   296
100  111k  100  111k    0     0   127k      0 --:--:-- --:--:-- --:--:--  965k
:::
::: You are root.
::: Reconfigure option selected.
::: Hostname length OK
::: Verifying free disk space...
:::
::: Package Cache update is needed, running apt-get update -y ...
 done!
:::
::: Checking apt-get for upgraded packages.... done!
:::
::: Your system is up to date! Continuing with PiVPN installation...
:::    Checking for git... already installed!
:::    Checking for tar... already installed!
:::    Checking for curl... already installed!
:::    Checking for grep... already installed!
:::    Checking for dnsutils... already installed!
:::    Checking for grepcidr... already installed!
:::    Checking for whiptail... already installed!
:::    Checking for net-tools... already installed!
:::    Checking for bsdmainutils... already installed!
:::    Checking for bash-completion... already installed!
:::    Checking for apt-transport-https... already installed!
:::    Checking for dhcpcd5... already installed!
:::    Checking for iptables-persistent... already installed!
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
::: IPv6 test connections to google.com have failed. Disabling IPv6 support. (The curl test failed with code: 7)
::: Using User: pi
:::
::: Checking for existing base files...
:::    Checking /usr/local/src/pivpn is a repo... OK!
:::     Updating repo in /usr/local/src/pivpn from https://github.com/pivpn/pivpn.git ... done!
::: Using VPN: WireGuard
::: Installing WireGuard from Raspbian package...
:::    Checking for wireguard-tools... already installed!
:::    Checking for qrencode... already installed!
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
::: Using Google servers.
::: Backing up the wireguard folder to /etc/wireguard_2023-02-25-153211.tar.gz
::: Server Keys have been generated.
::: Server config generated.
::: Install Complete...
::: Restarting services...
:::    Checking for unattended-upgrades... already installed!
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
::: Setupfiles copied to /etc/pivpn/wireguard/setupVars.conf
::: Installing scripts to /opt/pivpn...
unlink: cannot unlink '/etc/bash_completion.d/pivpn': No such file or directory
 done.
::: Flushing writes to disk...
::: done.
:::

Console output of pivpn add or pivpn add nopass

root@raspberrypi:/# pivpn add
::: To pass off to the pivpn command for each protocol
:::
::: Usage: pivpn wg  <command> [option]
::: Usage: pivpn ovpn <command> [option]
:::
:::  -h,  help             Show this help dialog
:::  -u,  uninstall        Uninstall pivpn from your system!
:::  -bk, backup           Backup VPN configs and user profiles

root@raspberrypi:/# pivpn wg add nopass
/usr/local/bin/pivpn: line 56: /opt/pivpn/wireguard/pivpn.sh: No such file or directory

root@raspberrypi:/# pivpn ovpn add nopass
/usr/local/bin/pivpn: line 59: /opt/pivpn/openvpn/pivpn.sh: No such file or directory


Console output of pivpn debug

root@raspberrypi:/# pivpn debug
::: To pass off to the pivpn command for each protocol
:::
::: Usage: pivpn wg  <command> [option]
::: Usage: pivpn ovpn <command> [option]
:::
:::  -h,  help             Show this help dialog
:::  -u,  uninstall        Uninstall pivpn from your system!
:::  -bk, backup           Backup VPN configs and user profiles

Thank you in advance, and apologies if it is something stupid...

4s3ti commented

Can you try that with a more recent raspbian/raspberrypi os release? Stretch is quite old by now, and might be the reason why.

I upgraded the OS to buster (not from scratch, followed the slow upgrade procedure) and still having the same issue: nothing is created within /opt.

Any ideas? Should I do a clean install?

EDIT: my model is Raspberry Pi 3 Model B Rev 1.2

4s3ti commented

If you can i'd romend a clean install

Hi all,

I can confirm after a clean install the /opt/pivpn folder in indeed created.

If anyone has the same issue, just do a clean install!