Fixes for archlinux
This commit is contained in:
parent
1700734c2a
commit
04ddeb761e
6 changed files with 55 additions and 11 deletions
|
|
@ -50,13 +50,44 @@ if linux_distro=='debian':
|
|||
print('Error, cannot install MariaDB...')
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
print('Setting the password...')
|
||||
|
||||
elif linux_distro=='arch':
|
||||
|
||||
if subprocess.call("sudo pacman -S --noconfirm mariadb", shell=True) > 0:
|
||||
if subprocess.call("sudo pacman -S --noconfirm mariadb expect", shell=True) > 0:
|
||||
print('Error, cannot install MariaDB...')
|
||||
exit(1)
|
||||
|
||||
if subprocess.call("sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql", shell=True) > 0:
|
||||
print('Error, cannot execute mariadb-install-db')
|
||||
sys.exit(1)
|
||||
|
||||
if subprocess.call("sudo systemctl restart mariadb", shell=True) > 0:
|
||||
print('Error, cannot start mariadb')
|
||||
sys.exit(1)
|
||||
|
||||
if subprocess.call("sudo MYSQL_PASS=%s ./modules/pastafari2/scripts/servers/databases/mariadb/mysql_secure.sh" % args.password, shell=True) > 0:
|
||||
|
||||
print('Error, cannot set the password')
|
||||
|
||||
sys.exit(1)
|
||||
|
||||
if args.ip:
|
||||
|
||||
print('Changing IP to listen...')
|
||||
|
||||
if subprocess.call("sudo sed -i 's/^\[server\]$/[server]\\n\\nbind-address = {}/g' /etc/my.cnf.d/server.cnf".format(args.ip), shell=True) > 0:
|
||||
print('Error, cannot install MariaDB...')
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
else:
|
||||
print('Listen localhost by default...')
|
||||
|
||||
|
||||
if subprocess.call("sudo systemctl enable mariadb", shell=True) > 0:
|
||||
print('Error, cannot start mariadb')
|
||||
sys.exit(1)
|
||||
|
||||
elif linux_distro=='rocky' or linux_distro=='alma' or linux_distro=='fedora':
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue