Skip to content

Commit

Permalink
Merge freeradius-wpe default enabled site fix
Browse files Browse the repository at this point in the history
Merge freeradius-wpe default enabled site fix
  • Loading branch information
InfamousSYN authored May 7, 2021
2 parents 9ccedaf + b60dde4 commit da815c2
Show file tree
Hide file tree
Showing 4 changed files with 995 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@
freeradius_log = logdir + "/freeradius-wpe.log"
freeradius_working_dir = "/etc/freeradius-wpe/3.0"
freeradius_mods_dir = freeradius_working_dir + '/mods-available'
freeradius_available_site_location = freeradius_working_dir + '/sites-available'
freeradius_mods_dir_eap_full = freeradius_mods_dir + '/eap'
freeradius_radiusd_full = freeradius_working_dir + '/radiusd.conf'
freeradius_clients_full = freeradius_working_dir + '/clients.conf'
freeradius_default_site_full = freeradius_available_site_location + '/default'
freeradius_command = "-X -l %s -d %s"
wpelogfile = logdir + "/freeradius-server-wpe.log"
wpelogfile_default_install = "/var/log/freeradius-server-wpe.log"
Expand Down
15 changes: 15 additions & 0 deletions core/libs/conf_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,21 @@ def configure(cls,
print("[!] Error: %s" % e)
return 1

class freeradius_default_available_site_conf(object):

path = config.freeradius_default_site_full
template = freeradius_cnf.freeradius_default_site_conf

@classmethod
def configure(cls):
try:
print("[+] Rewriting the default site file: {}".format(cls.path))
with open(cls.path, 'w') as fd:
fd.write(cls.template)
except Exception as e:
print("[!] Error: {}".format(e))
return 1

class freeradius_eap_conf(object):

path = config.freeradius_mods_dir_eap_full
Expand Down
Loading

0 comments on commit da815c2

Please sign in to comment.