Fixes in php

This commit is contained in:
absurdo 2023-12-01 00:31:34 +01:00
parent d665b4e8fc
commit 1ff962b2ae
3 changed files with 67 additions and 14 deletions

View file

@ -9,6 +9,7 @@ import pathlib
import distro
import pwd
import getpass
from time import sleep
#import pymysql.cursors
#pymysql.install_as_MySQLdb
@ -194,12 +195,14 @@ if args.path!='/':
print('Error')
sys.exit(1)
print('Restarting apache...')
sleep(1)
if subprocess.call('sudo '+apachectl+' configtest && sudo systemctl restart '+apache_cmd, shell=True) > 0:
subprocess.call('sudo rm /etc/{}/vhosts.d/extra/{}'.format(apache_cmd, base_name_file), shell=True)
print('Error: Error in configtest\n')
sys.exit(1)
print('Restarting apache...')
if subprocess.call('sudo '+apachectl+' configtest && sudo systemctl restart '+apache_cmd, shell=True) > 0:
subprocess.call('sudo rm /etc/{}/vhosts.d/extra/{}'.format(apache_cmd, base_name_file), shell=True)
print('Error: Error in configtest\n')
sys.exit(1)
print('phpmyadmin installed!')