Added delete flask webapp

This commit is contained in:
absurdo 2023-11-29 23:56:47 +01:00
parent 90990ab1c0
commit cde921f940

View file

@ -35,6 +35,10 @@ name_service=os.path.basename(home_user[:-1]).strip()
domain=os.path.basename(home_user[:-1].replace(name_service, '')[:-1]).strip() domain=os.path.basename(home_user[:-1].replace(name_service, '')[:-1]).strip()
if name_service=='htdocs':
name_service='flask'
home_user=home_user.replace('flask', 'htdocs')
#print(domain) #print(domain)
if subprocess.call('sudo systemctl stop %s-%s.service && sudo rm /etc/systemd/system/%s-%s.service' % (domain, name_service, domain, name_service), shell=True) > 0: if subprocess.call('sudo systemctl stop %s-%s.service && sudo rm /etc/systemd/system/%s-%s.service' % (domain, name_service, domain, name_service), shell=True) > 0: