summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2021-10-08 13:29:05 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2021-10-08 13:29:05 (GMT)
commit11de3943408a48b2890a100410940990c9bdfad6 (patch)
tree1261da7da0eb0c7fac37a829ea08a1a5061e8af5
parentdd6654595f498d9bc2c43961839337c35b873855 (diff)
downloadmisc-fred-11de3943408a48b2890a100410940990c9bdfad6.zip
misc-fred-11de3943408a48b2890a100410940990c9bdfad6.tar.gz
misc-fred-11de3943408a48b2890a100410940990c9bdfad6.tar.bz2
grandlyon: fix copy of media files
-rw-r--r--grandlyon/scripts/copy-portal-users.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/grandlyon/scripts/copy-portal-users.py b/grandlyon/scripts/copy-portal-users.py
index d801eb9..6891ba1 100644
--- a/grandlyon/scripts/copy-portal-users.py
+++ b/grandlyon/scripts/copy-portal-users.py
@@ -29,6 +29,6 @@ open('/tmp/site-export.json', 'w').write(site_export)
subprocess.call(['sudo', '-u', 'combo', 'combo-manage', 'tenant_command', 'import_site', '-d', dest_site, '/tmp/site-export.json'])
subprocess.call(['sudo', '-u', 'combo', 'combo-manage', 'tenant_command', 'runscript', '-d', dest_site, 'fsck-combo.py'])
-orig_media_dir = '/var/lib/combo/tenants/%s/media/*' % orig_site
+orig_media_dir = '/var/lib/combo/tenants/%s/media' % orig_site
if os.path.exists(orig_media_dir) and os.listdir(orig_media_dir):
- subprocess.call(['sudo', '-u', 'combo', 'cp', '-ar', orig_media_dir, '/var/lib/combo/tenants/%s/' % dest_site])
+ subprocess.call(['sudo', '-u', 'combo', 'cp', '-ar', orig_media_dir + '*', '/var/lib/combo/tenants/%s/' % dest_site])