check postinstall

This commit is contained in:
Kload 2013-06-13 14:20:22 +02:00
parent 7ac5fcc953
commit 4433f1de89
2 changed files with 7 additions and 1 deletions

View file

@ -184,6 +184,11 @@ def main():
sys.argv.pop(key) sys.argv.pop(key)
try: try:
try:
with open('/etc/yunohost/installed') as f: pass
except IOError:
raise YunoHostError(17, _("YunoHost is not correctly installed, please execute 'yunohost tools postinstall'"))
args = parse_dict(action_map) args = parse_dict(action_map)
args_dict = vars(args).copy() args_dict = vars(args).copy()
for key in args_dict.keys(): for key in args_dict.keys():

View file

@ -179,7 +179,8 @@ def tools_postinstall(domain, password):
# Create required folders # Create required folders
folders_to_create = [ folders_to_create = [
'/etc/yunohost/apps', '/etc/yunohost/apps',
'/etc/yunohost/certs' '/etc/yunohost/certs',
'/var/cache/yunohost/repo'
] ]
for folder in folders_to_create: for folder in folders_to_create: