diff --git a/scripts/servers/cvs/install_gitea.py b/scripts/servers/cvs/install_gitea.py index 10d704a..f778d87 100644 --- a/scripts/servers/cvs/install_gitea.py +++ b/scripts/servers/cvs/install_gitea.py @@ -1,4 +1,4 @@ -#!/opt/pythonenv/bin/python3 -u +#!/usr/bin/python3 -u import sys, os import subprocess diff --git a/scripts/servers/databases/mariadb/install_mariadb.py b/scripts/servers/databases/mariadb/install_mariadb.py index 05a8983..be6cdbc 100644 --- a/scripts/servers/databases/mariadb/install_mariadb.py +++ b/scripts/servers/databases/mariadb/install_mariadb.py @@ -1,4 +1,4 @@ -#!/opt/pythonenv/bin/python3 -u +#!/usr/bin/python3 -u import sys import subprocess @@ -160,4 +160,5 @@ if subprocess.call("sudo echo 'mariadb-server mariadb-server/root_password_again sys.exit(1) """ -print('Setted the password') +#print('Setted the password') +print('Mariadb installed!') diff --git a/scripts/system/change_password.py b/scripts/system/change_password.py index 729a04d..58d01ad 100644 --- a/scripts/system/change_password.py +++ b/scripts/system/change_password.py @@ -1,4 +1,4 @@ -#!/opt/pythonenv/bin/python3 -u +#!/usr/bin/python3 -u import sys import argparse diff --git a/scripts/system/install_git.py b/scripts/system/install_git.py index b05b39c..3610486 100644 --- a/scripts/system/install_git.py +++ b/scripts/system/install_git.py @@ -1,4 +1,4 @@ -#!/opt/pythonenv/bin/python3 -u +#!/usr/bin/python3 -u # A script for install pzoo user diff --git a/scripts/system/install_php.py b/scripts/system/install_php.py index da1ede6..655f50c 100644 --- a/scripts/system/install_php.py +++ b/scripts/system/install_php.py @@ -1,4 +1,4 @@ -#!/opt/pythonenv/bin/python3 -u +#!/usr/bin/python3 -u # A script for install pzoo user diff --git a/scripts/system/install_python.sh b/scripts/system/install_python.sh index 142301d..e455e96 100644 --- a/scripts/system/install_python.sh +++ b/scripts/system/install_python.sh @@ -20,7 +20,7 @@ elif [[ $DISTRO =~ ^NAME=\"Arch ]]; then pacman -Syu --noconfirm sudo - sudo pacman -S --noconfirm python python-pip sudo augeas python-virtualenv + sudo pacman -S --noconfirm python python-pip sudo augeas python-virtualenv python-distro elif [[ $DISTRO =~ ^NAME=\"Rocky ]] || [[ $DISTRO =~ ^Alma ]]; then @@ -28,7 +28,7 @@ elif [[ $DISTRO =~ ^NAME=\"Rocky ]] || [[ $DISTRO =~ ^Alma ]]; then sudo dnf upgrade -y - sudo dnf install -y python python-pip sudo augeas-libs + sudo dnf install -y python python-pip sudo augeas-libs python3-distro #Install EPEL dnf config-manager --set-enabled crb sudo dnf install -y \ @@ -42,7 +42,7 @@ elif [[ $DISTRO =~ ^Fedora ]]; then sudo dnf upgrade -y - sudo dnf install -y python3 python3-pip sudo augeas-libs + sudo dnf install -y python3 python3-pip sudo augeas-libs python3-distro else @@ -66,36 +66,36 @@ else fi -echo '{"error": 0, "status": 0, "progress": 0, "no_progress":0, "message": "Installing distro package for python and detect distribution..."}' +# 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 python3 -m venv /opt/pythonenv/ -sudo /opt/pythonenv/bin/pip install --upgrade pip +# sudo /opt/pythonenv/bin/pip install --upgrade pip #echo "export PS_REAL=\$PS1 && source /opt/pythonenv/bin/activate && export PS1=\$PS_REAL && export PYTHONUNBUFFERED=1" >> /etc/profile.d/zpythonenv.sh #echo "export PYTHONUNBUFFERED=1" >> /etc/profile.d/pythonenv.sh -sleep 1 +# sleep 1 -sudo /opt/pythonenv/bin/pip3 install distro +# sudo /opt/pythonenv/bin/pip3 install distro -if [ $? -eq 0 ]; then +# if [ $? -eq 0 ]; then #echo "Installed python3 sucessfully if not error..." - echo '{"error": 0, "status": 0, "progress": 100, "no_progress":0, "message": "Installed distro python package sucessfully..."}' + #echo '{"error": 0, "status": 0, "progress": 100, "no_progress":0, "message": "Installed distro python package sucessfully..."}' - sleep 1 + #sleep 1 -else +#else - echo "Sorry, cannot install distro python package..." +# echo "Sorry, cannot install distro python package..." - exit 1; +#exit 1; -fi +#fi sleep 1 diff --git a/scripts/system/install_pzoo_stats.py b/scripts/system/install_pzoo_stats.py index cc83616..04fbfba 100644 --- a/scripts/system/install_pzoo_stats.py +++ b/scripts/system/install_pzoo_stats.py @@ -1,4 +1,4 @@ -#!/opt/pythonenv/bin/python3 -u +#!/usr/bin/python3 -u # A script for install pzoo user diff --git a/scripts/system/updates.py b/scripts/system/updates.py index 1e6de0a..c78f9ac 100644 --- a/scripts/system/updates.py +++ b/scripts/system/updates.py @@ -1,4 +1,4 @@ -#!/opt/pythonenv/bin/python3 -u +#!/usr/bin/python3 -u # A script for install pzoo user diff --git a/tasks/system/task.py b/tasks/system/task.py index ae23a5c..0fdbed2 100644 --- a/tasks/system/task.py +++ b/tasks/system/task.py @@ -11,10 +11,10 @@ class ServerTask(Task): self.files=[['modules/pastafari2/scripts/system/install_pzoo_stats.py', 0o755]] self.files.append(['modules/pastafari2/scripts/system/install_python.sh', 0o755]) - self.files.append(['modules/pastafari2/scripts/system/install_psutil.sh', 0o755]) + #self.files.append(['modules/pastafari2/scripts/system/install_psutil.sh', 0o755]) self.files.append(['modules/pastafari2/scripts/system/install_git.py', 0o755]) self.files.append(['modules/pastafari2/scripts/system/install_php.py', 0o755]) - self.files.append(['modules/pastafari2/scripts/system/install_unixutils.sh', 0o755]) + #self.files.append(['modules/pastafari2/scripts/system/install_unixutils.sh', 0o755]) self.files.append(['modules/pastafari2/scripts/system/sudoers.d/spanel', 0o640]) self.files.append([self.data['pub_key'], 0o600]) @@ -25,8 +25,8 @@ class ServerTask(Task): self.commands_to_execute.append(['modules/pastafari2/scripts/system/install_python.sh', '']) self.commands_to_execute.append(['modules/pastafari2/scripts/system/install_git.py', '']) self.commands_to_execute.append(['modules/pastafari2/scripts/system/install_php.py', '']) - self.commands_to_execute.append(['modules/pastafari2/scripts/system/install_unixutils.sh', '']) - self.commands_to_execute.append(['modules/pastafari2/scripts/system/install_psutil.sh', '']) + #self.commands_to_execute.append(['modules/pastafari2/scripts/system/install_unixutils.sh', '']) + #self.commands_to_execute.append(['modules/pastafari2/scripts/system/install_psutil.sh', '']) #' --url_stats='+self.data['url_stats']+