Installation/Upgrading script is user dependent
Steps to reproduce
- Run the script first time with a user, lets say
marcel@instance.url
- Try to run the script to upgrade the software with another user, lets say
root@instance.url
. You'll get this error
# sudo sh -c "$(curl -sSL https://get.funkwhale.audio/upgrade.sh)"
[Beginning upgrade]
[1/4] Retrieving currently installed version from /srv/funkwhale/ansible/playbook.yml
[1/4] No target version specified, retrieving latest version from https://docs.funkwhale.audio/latest.txt
Upgrade summary:
- Current version: 1.1
- Target version: 1.1
- Upgrading may cause temporary downtime on your pod
Do you want to proceed with the upgrade? [YES/no]:
[2/4] Replacing current version number in /srv/funkwhale/ansible/playbook.yml…
[3/4] Upgrading ansible dependencies...
[3/4] Upgrading Funkwhale using ansible playbook in /srv/funkwhale/ansible...
sh: 98: /root/.local/bin/ansible-galaxy: not found
What happens?
Seems that this happens because the installation of dependencies is made with a per-user basis, so running the script with other users will not find out the dependencies.
Workaround
Maybe running the script with other users but from the first user's /home directory could work.
What is expected?
I expected that the dependencies are not user dependent, so the script can be run with any other user too.