amnezia-vpn / amnezia-client

Amnezia VPN Client (Desktop+Mobile)
https://amnezia.org
GNU General Public License v3.0
5.85k stars 368 forks source link

Working only in bash shell only #1201

Open YouROK opened 1 month ago

YouROK commented 1 month ago

Describe the bug If a default shell other than bash is installed on the server, the installation fails.

To Reproduce Steps to reproduce the behavior: On vps server:

apt install fish
chsh
# enter "/usr/bin/fish"

On host in AmneziaVPN select Self-hosted VPN and all next. VPN protocol I select awg. And click Install button

Expected behavior Execute scripts in the bash, not in the default shell.

Screenshots

image

Desktop (please complete the following information):

Server (please complete the following information):

vanyasem commented 4 weeks ago

The scripts should specify a shebang #!/usr/bin/env bash instead of relying on the default shell

check_user_in_sudo.sh fails to get executed on fish shell, resulting in an Error 205: ServerUserNotInSudo:

$ CUR_USER=$(whoami);\
  groups $CUR_USER
fish: Unsupported use of '='. In fish, please use 'set CUR_USER $(whoami)'.