mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-08 09:41:35 +00:00
Merge pull request #252 from SunilMohanAdapa/pagekite-speed
I tested the changes and confirm that everything works as before, only faster :)
This commit is contained in:
commit
2ab99588ba
@ -30,7 +30,7 @@ import sys
|
||||
from plinth import action_utils
|
||||
from plinth.modules.pagekite import utils
|
||||
|
||||
aug = augeas.Augeas()
|
||||
aug = None
|
||||
|
||||
PATHS = {
|
||||
'service_on': os.path.join(utils.CONF_PATH, '*', 'service_on', '*'),
|
||||
@ -239,8 +239,20 @@ def subcommand_set_kite(arguments):
|
||||
aug.save()
|
||||
|
||||
|
||||
def augeas_load():
|
||||
"""Initialize Augeas."""
|
||||
global aug
|
||||
aug = augeas.Augeas(flags=augeas.Augeas.NO_LOAD +
|
||||
augeas.Augeas.NO_MODL_AUTOLOAD)
|
||||
aug.set('/augeas/load/Pagekite/lens', 'Pagekite.lns')
|
||||
aug.set('/augeas/load/Pagekite/incl[last() + 1]', '/etc/pagekite.d/*.rc')
|
||||
aug.load()
|
||||
|
||||
|
||||
def main():
|
||||
"""Parse arguments and perform all duties"""
|
||||
augeas_load()
|
||||
|
||||
arguments = parse_arguments()
|
||||
|
||||
subcommand = arguments.subcommand.replace('-', '_')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user