Fixes for archlinux
This commit is contained in:
parent
1700734c2a
commit
04ddeb761e
6 changed files with 55 additions and 11 deletions
|
|
@ -14,6 +14,8 @@ sleep(1)
|
|||
|
||||
if linux_distro=='arch':
|
||||
|
||||
# if call("sudo pacman -S --noconfirm --needed git base-devel && git clone https://aur.archlinux.org/yay.git && cd yay && makepkg -si", shell=True) > 0:
|
||||
|
||||
if call("sudo pacman -S --noconfirm git", shell=True) > 0:
|
||||
print('Error, cannot install git...')
|
||||
exit(1)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ if [[ $DISTRO =~ ^Debian ]] || [[ $DISTRO =~ ^Ubuntu ]]; then
|
|||
|
||||
elif [[ $DISTRO =~ ^NAME=\"Arch ]]; then
|
||||
|
||||
pacman -Syu sudo
|
||||
pacman -Syu --noconfirm sudo
|
||||
|
||||
sudo pacman -S --noconfirm python python-pip sudo augeas python-virtualenv
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ sudo /opt/certbot/bin/pip install certbot certbot
|
|||
|
||||
echo "0 0,12 * * * root /opt/certbot/bin/python -c 'import random; import time; time.sleep(random.random() * 3600)' && sudo certbot renew -q" | sudo tee -a /etc/crontab > /dev/null
|
||||
|
||||
sudo ln -s /opt/certbot/bin/certbot /usr/bin/certbot
|
||||
sudo ln -sf /opt/certbot/bin/certbot /usr/bin/certbot
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import pwd
|
|||
from subprocess import call
|
||||
from pathlib import Path
|
||||
from time import sleep
|
||||
import distro
|
||||
|
||||
parser = argparse.ArgumentParser(description='A script for install leviathan user')
|
||||
|
||||
|
|
@ -191,6 +192,16 @@ if check_url.match(args.url_stats):
|
|||
print('{"error": 0, "status": 0, "progress": 100, "no_progress":0, "message": "Tools installed..."}')
|
||||
|
||||
sleep(1)
|
||||
|
||||
linux_distro=distro.id()
|
||||
|
||||
# sudo su - %s -s /bin/bash -c 'mkdir -p %s'
|
||||
|
||||
if linux_distro=='arch':
|
||||
print('Add utilities for archlinux distro...')
|
||||
if call("sudo su - %s -s /bin/bash -c 'sudo pacman -S --noconfirm --needed git base-devel && git clone https://aur.archlinux.org/yay.git && cd yay && makepkg -si --noconfirm --needed'" % args.user, shell=True) > 0:
|
||||
print('Error, cannot add utilities for archlinux')
|
||||
exit(1)
|
||||
|
||||
else:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue