diff --git a/conf/config_local.php b/conf/config_local.php index 6b98d51..3ac23c9 100644 --- a/conf/config_local.php +++ b/conf/config_local.php @@ -16,13 +16,13 @@ */ $config['calibre_directory'] = '__CALIBRE_DIR__/'; -/* -* $config['calibre_internal_directory'] = '/Calibre/'; -* -* $config['cops_full_url'] = '__DOMAIN____PATH__/ '; -* -* $config['cops_x_accel_redirect'] = "X-Accel-Redirect"; -*/ + +$config['calibre_internal_directory'] = '/Calibre/'; + +$config['cops_full_url'] = '__DOMAIN____PATH__/ '; + +$config['cops_x_accel_redirect'] = "X-Accel-Redirect"; + /* * Catalog's title */ diff --git a/scripts/install b/scripts/install index ab2b9ca..2652e37 100755 --- a/scripts/install +++ b/scripts/install @@ -105,12 +105,13 @@ ynh_multimedia_addaccess $app calibre_dir=/home/yunohost.multimedia/share/eBook ynh_app_setting_set --app=$app --key=calibre_dir --value=$calibre_dir -# #Check if metadata.db file exists. If not create it (empty library) -# if [ ! -e "$calibre_dir"/metadata.db ]; then -# cp -a ../conf/metadata.db.empty $calibre_dir/metadata.db -# fi +#Check if metadata.db file exists. If not create it (empty library) +if [ ! -e "$calibre_dir"/metadata.db ]; then + cp -a ../conf/metadata.db.empty $calibre_dir/metadata.db +fi chmod 750 "$calibre_dir" +chmod 777 "$calibre_dir/metadata.db" chmod -R o-rwx "$calibre_dir" chown -R $app:www-data "$calibre_dir"