I need to deploy teamviewer on the system I have installed (raspberry pi4 with raspbian).
I need a simplicity in, fact I send an USB-stick to my client, and they click on file to launch install.
I can't go on different site. I want to use python to deploy
My Python script:
#!/usr/bin/env python3
import subprocess
import os
import stat
st = os.stat('./team.sh')
os.chmod('./team.sh', st.st_mode | stat.S_IEXEC)
subprocess.call("./team.sh")
and my bash script:
#!/bin/bash
sudo apt-get -y update;
sudo apt-get -y upgrade;
wget https://download.teamviewer.com/download/linux/teamviewer-host_armhf.deb;
ls | grep teamviewer-host_armhf.deb;
sudo dpkg -i teamviewer-host_armhf.deb;
sudo apt --fix-broken install;
sudo teamviewer passwd myspassword;
teamviewer info;
The Bash script work perfectly.
But i have a problem with Python. When I run it, I get
FileNotFoundError: [Errno 2] No such file or directory: 'team.sh'
I don't understand because all files are in the same directory.