Fixes in proxy virtualhost
This commit is contained in:
parent
b2b879c3f8
commit
d3d041f569
9 changed files with 84 additions and 21 deletions
|
|
@ -35,9 +35,11 @@ name_service=os.path.basename(home_user[:-1]).strip()
|
|||
|
||||
domain=os.path.basename(home_user[:-1].replace(name_service, '')[:-1]).strip()
|
||||
|
||||
if home_user.find('/htdocs/', -8)!=-1:
|
||||
home_user=home_user.replace('htdocs', 'flask')
|
||||
|
||||
if name_service=='htdocs':
|
||||
name_service='flask'
|
||||
#home_user=home_user.replace('flask', 'htdocs')
|
||||
|
||||
#print(domain)
|
||||
|
||||
|
|
@ -45,7 +47,7 @@ if subprocess.call('sudo systemctl stop %s-%s.service && sudo rm /etc/systemd/sy
|
|||
print('Error: cannot delete app service in systemd...')
|
||||
sys.exit(1)
|
||||
|
||||
if subprocess.call("sudo su %s -s /bin/bash -c 'rm -f -r %s'" % (args.user, args.home_user), shell=True) > 0:
|
||||
if subprocess.call("sudo su %s -s /bin/bash -c 'rm -f -r %s'" % (args.user, home_user), shell=True) > 0:
|
||||
print('Error: cannot delete %s' % args.home_user)
|
||||
sys.exit(1)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue