Fixes in scripts for debian 12
This commit is contained in:
parent
9161c35cac
commit
711893b7df
4 changed files with 15 additions and 7 deletions
|
|
@ -6,7 +6,7 @@ sleep 1
|
|||
|
||||
echo '{"error": 0, "status": 0, "progress": 100, "no_progress":0, "message": "Installing python3-psutil..."}'
|
||||
|
||||
sudo pip3 install psutil
|
||||
sudo /opt/pythonenv/bin/pip3 install psutil
|
||||
#sudo apt-get install -y python3-psutil
|
||||
|
||||
#echo "Installed python3-psutil sucessfully if not error..."
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ elif [[ $DISTRO =~ ^NAME=\"Arch ]]; then
|
|||
|
||||
sudo pacman -S --noconfirm python python-pip sudo augeas python-virtualenv
|
||||
|
||||
elif [[ $DISTRO =~ ^NAME=\"Rocky ]]; then
|
||||
elif [[ $DISTRO =~ ^NAME=\"Rocky ]] || [[ $DISTRO =~ ^NAME=\"Alma ]]; then
|
||||
|
||||
dnf install -y sudo
|
||||
|
||||
|
|
@ -68,10 +68,18 @@ fi
|
|||
|
||||
echo '{"error": 0, "status": 0, "progress": 0, "no_progress":0, "message": "Installing distro package for python and detect distribution..."}'
|
||||
|
||||
# Install virtualenv python and give source in profile.
|
||||
|
||||
sudo python3 -m venv /opt/pythonenv/
|
||||
|
||||
sudo /opt/pythonenv/bin/pip install --upgrade pip
|
||||
|
||||
echo "export PS_REAL=\$PS1 && source /opt/pythonenv/bin/activate && export PS1=\$PS_REAL" >> /etc/profile.d/zpythonenv.sh
|
||||
|
||||
sleep 1
|
||||
|
||||
sudo pip3 install distro
|
||||
|
||||
sudo /opt/pythonenv/bin/pip3 install distro
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
|
||||
#echo "Installed python3 sucessfully if not error..."
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ if check_url.match(args.url_stats):
|
|||
|
||||
os.chmod('/etc/cron.daily/get_updates.py', 0o700)
|
||||
"""
|
||||
if call("sudo pip3 install --upgrade git+https://bitbucket.org/paramecio/pastafaristats", shell=True)>0:
|
||||
if call("sudo /opt/pythonenv/bin/pip3 install --upgrade git+https://bitbucket.org/paramecio/pastafaristats", shell=True)>0:
|
||||
print('Error, cannot install pastafari stats')
|
||||
exit(1)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
# Install unix tools repo.
|
||||
|
||||
sudo pip3 install git+https://bitbucket.org/paramecio/pastafariutils
|
||||
sudo /opt/pythonenv/bin/pip3 install git+https://bitbucket.org/paramecio/pastafariutils
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue