mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Rename 'etc' folder and move yunohost into a separate package
This commit is contained in:
parent
e6dd0ab4e9
commit
2b370be233
18 changed files with 12 additions and 12 deletions
|
@ -7,7 +7,7 @@ import os
|
|||
session_path = '/var/cache/yunohost/session'
|
||||
|
||||
# Path of the actions map definition(s)
|
||||
actionsmap_path = os.path.dirname(__file__) +'/../../etc/actionsmap'
|
||||
actionsmap_path = os.path.dirname(__file__) +'/../../data/actionsmap'
|
||||
|
||||
# Path for the actions map cache
|
||||
actionsmap_cache_path = '/var/cache/yunohost/actionsmap'
|
||||
|
|
|
@ -298,7 +298,7 @@ class ActionsMap(object):
|
|||
function = '%s_%s' % (category, action)
|
||||
|
||||
try:
|
||||
mod = __import__(module, globals=globals(), fromlist=[function], level=2)
|
||||
mod = __import__(module, globals=globals(), fromlist=[function], level=0)
|
||||
func = getattr(mod, function)
|
||||
except (AttributeError, ImportError):
|
||||
raise YunoHostError(168, _('Function is not defined'))
|
||||
|
|
|
@ -37,7 +37,7 @@ from domain import domain_list, domain_add
|
|||
from user import user_info, user_list
|
||||
from hook import hook_exec, hook_add, hook_remove
|
||||
|
||||
from ..core.helpers import YunoHostError, YunoHostLDAP, win_msg, random_password, is_true, validate
|
||||
from .moulinette.core.helpers import YunoHostError, YunoHostLDAP, win_msg, random_password, is_true, validate
|
||||
|
||||
repo_path = '/var/cache/yunohost/repo'
|
||||
apps_path = '/usr/share/yunohost/apps'
|
|
@ -29,7 +29,7 @@ import json
|
|||
import yaml
|
||||
import glob
|
||||
|
||||
from ..core.helpers import YunoHostError, YunoHostLDAP, validate, colorize, win_msg
|
||||
from moulinette.core.helpers import YunoHostError, YunoHostLDAP, validate, colorize, win_msg
|
||||
|
||||
def backup_init(helper=False):
|
||||
"""
|
|
@ -34,7 +34,7 @@ import requests
|
|||
from urllib import urlopen
|
||||
from dyndns import dyndns_subscribe
|
||||
|
||||
from ..core.helpers import YunoHostError, YunoHostLDAP, win_msg, colorize, validate, get_required_args
|
||||
from moulinette.core.helpers import YunoHostError, YunoHostLDAP, win_msg, colorize, validate, get_required_args
|
||||
|
||||
|
||||
def domain_list(filter=None, limit=None, offset=None):
|
|
@ -30,7 +30,7 @@ import json
|
|||
import glob
|
||||
import base64
|
||||
|
||||
from ..core.helpers import YunoHostError, YunoHostLDAP, validate, colorize, win_msg
|
||||
from moulinette.core.helpers import YunoHostError, YunoHostLDAP, validate, colorize, win_msg
|
||||
|
||||
def dyndns_subscribe(subscribe_host="dyndns.yunohost.org", domain=None, key=None):
|
||||
"""
|
|
@ -37,7 +37,7 @@ except ImportError:
|
|||
sys.stderr.write('apt-get install python-yaml\n')
|
||||
sys.exit(1)
|
||||
|
||||
from ..core.helpers import YunoHostError, win_msg
|
||||
from moulinette.core.helpers import YunoHostError, win_msg
|
||||
|
||||
|
||||
def firewall_allow(protocol=None, port=None, ipv6=None, upnp=False):
|
|
@ -28,7 +28,7 @@ import sys
|
|||
import re
|
||||
import json
|
||||
|
||||
from ..core.helpers import YunoHostError, YunoHostLDAP, win_msg, colorize
|
||||
from moulinette.core.helpers import YunoHostError, YunoHostLDAP, win_msg, colorize
|
||||
|
||||
hook_folder = '/usr/share/yunohost/hooks/'
|
||||
|
|
@ -37,7 +37,7 @@ from datetime import datetime, timedelta
|
|||
from service import (service_enable, service_disable,
|
||||
service_start, service_stop, service_status)
|
||||
|
||||
from ..core.helpers import YunoHostError, win_msg
|
||||
from moulinette.core.helpers import YunoHostError, win_msg
|
||||
|
||||
glances_uri = 'http://127.0.0.1:61209'
|
||||
stats_path = '/var/lib/yunohost/stats'
|
|
@ -28,7 +28,7 @@ import glob
|
|||
import subprocess
|
||||
import os.path
|
||||
|
||||
from ..core.helpers import YunoHostError, win_msg
|
||||
from moulinette.core.helpers import YunoHostError, win_msg
|
||||
|
||||
|
||||
def service_start(names):
|
|
@ -36,7 +36,7 @@ from dyndns import dyndns_subscribe
|
|||
from backup import backup_init
|
||||
from app import app_ssowatconf
|
||||
|
||||
from ..core.helpers import YunoHostError, YunoHostLDAP, validate, colorize, get_required_args, win_msg
|
||||
from moulinette.core.helpers import YunoHostError, YunoHostLDAP, validate, colorize, get_required_args, win_msg
|
||||
|
||||
|
||||
def tools_ldapinit(password=None):
|
|
@ -33,7 +33,7 @@ import getpass
|
|||
from domain import domain_list
|
||||
from hook import hook_callback
|
||||
|
||||
from ..core.helpers import YunoHostError, YunoHostLDAP, win_msg, colorize, validate, get_required_args
|
||||
from moulinette.core.helpers import YunoHostError, YunoHostLDAP, win_msg, colorize, validate, get_required_args
|
||||
|
||||
def user_list(fields=None, filter=None, limit=None, offset=None):
|
||||
"""
|
Loading…
Reference in a new issue