Skip to content

Commit

Permalink
Update ssl_acme.py
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Dec 21, 2024
1 parent 0f63145 commit 737450b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions web/admin/site/ssl_acme.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import os
import json
import re

from flask import Blueprint, render_template
from flask import request
Expand All @@ -28,23 +29,24 @@
@blueprint.route('/get_acme_logs', endpoint='get_acme_logs', methods=['POST'])
@panel_login_required
def get_acme_logs():
log_file = mw.getPanelDir() + '/logs/acme.log'
log_file = MwSites.instance().acmeLogFile()
if not os.path.exists(log_file):
mw.execShell('touch ' + log_file)
return mw.returnData(True, 'OK', log_file)


@blueprint.route('/create_acme', endpoint='create_acme', methods=['POST'])
@panel_login_required
def create_acme():
def create_acme():
site_name = request.form.get('siteName', '')
domains = request.form.get('domains', '')
force = request.form.get('force', '')
renew = request.form.get('renew', '')
email = request.form.get('email', '')
wildcard_domain = request.form.get('wildcard_domain','')
apply_type = request.form.get('apply_type', 'file')
dnspai = request.form.get('dnspai','')
dnspai = request.form.get('dnspai','')
dns_alias = request.form.get('dns_alias','')
return MwSites.instance().createAcme(site_name, domains, force, renew, apply_type, dnspai, email, wildcard_domain)


Expand Down

0 comments on commit 737450b

Please sign in to comment.