diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..24cab56 Binary files /dev/null and b/.DS_Store differ diff --git a/scripts/password.php b/conf/password.php similarity index 100% rename from scripts/password.php rename to conf/password.php diff --git a/scripts/.DS_Store b/scripts/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/scripts/.DS_Store differ diff --git a/scripts/install b/scripts/install index 82c1f0b..86f89f8 100644 --- a/scripts/install +++ b/scripts/install @@ -88,25 +88,11 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 ynh_add_fpm_config --package="$extra_php_dependencies" phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) -#================================================= -# SPECIFIC SETUP -#================================================= -# CONFIGURE BICBUCSTRIIM -#================================================= - -books_path=/home/$admin/calibre_library -cp -r ../empty_library $books_path - -# Disable BicBucStriim login if checked -if [[ $login -eq 1 ]]; then - sed -i -- 's/\[LOGIN_REQUIRED\] = 1/\[LOGIN_REQUIRED\] = 0/g' "$final_path"/index.php -fi - #================================================= # SECURE FILES AND DIRECTORIES #================================================= -cp password.php $final_path/ynh_password.php +cp ../conf/password.php $final_path/ynh_password.php cd $final_path hash=$(php ynh_password.php $admin_pwd) rm ynh_password.php @@ -131,12 +117,18 @@ datadir=/home/yunohost.app/$app ynh_app_setting_set --app=$app --key=datadir --value=$datadir mkdir -p $datadir +cp -r ../empty_library $baradir chmod 750 "$datadir" #chmod -R o-rwx "$datadir" chown -R $app:www-data "$datadir" chmod -R ga+w "$datadir" +# Disable BicBucStriim login if checked +if [[ $login -eq 1 ]]; then + sed -i -- 's/\[LOGIN_REQUIRED\] = 1/\[LOGIN_REQUIRED\] = 0/g' $final_path/index.php +fi + #================================================= # SETUP SSOWAT #=================================================