diff --git a/README.md b/README.md index 7f24b66..81bafa5 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,19 @@ Calibre-Web is a web app providing a clean interface for browsing, reading and d *This software is a fork of [library](https://github.com/mutschler/calibreserver) and licensed under the GPL v3 License.* -Alternatively, you may use [COPS](https://github.com/YunoHost-Apps/cops_ynh) which also allows access to you Calibre Library, but in read-only mode. +Alternatively, you may use [COPS](https://github.com/YunoHost-Apps/cops_ynh) which also allows access to your Calibre Library, but in read-only mode. **Shipped version:** To be 1.0, let's say 0.9 :) + +Library will be placed in `/home/yunohost.multimedia/share/eBook` folder except if both : + - calibreweb is set as a private application + - calibreweb library is set as a public library + +In this case the library will be set in `/home/yunohost.multimedia/[admin]/eBook` folder. Library folder can always be changed manually in the application settings by the administrator. + +This app support http authentification. + ## Screenshots  @@ -31,10 +40,10 @@ yunohost app setting calibreweb backup_core_only -v 0 By default, removing the app will **never** delete the library. -## Limitations +## Known Limitations -* No LDAP support -* access to library to be done manually after install if Calibre library was already existing, for example : +* Partial LDAP support : user existing both in Yunohost and calibreweb can use their Yunohost password to log in, but user existing previously to the application installation will not be duplicated in the database automatically +* Authorization access to library to be done manually after install if Calibre library was already existing, for example : ``` chown -R calibreweb: path/to/library or @@ -42,6 +51,7 @@ chmod o+rw path/to/library ``` * Do not use a Nextcloud folder. It's all right if the folder is an external storage in Nextcloud but not if it's an internal one : Changing the data in the library will cause trouble with the sync * "Magic link feature is not yet available +* Change to library made outside calibreweb are not automatically updated in calibreweb. It is required to disconnect and reconnect to see the changes ## Links @@ -66,11 +76,12 @@ sudo yunohost app upgrade calibreweb -u https://github.com/Yunohost-Apps/calibre ## Todo - [X] Multiinstance -- [ ] Better Multimedia integration : Integrate in Yunohost.multimedia -- [ ] User and possibly LDAP integration +- [X] Better Multimedia integration : Integrate in Yunohost.multimedia +- [X] User and possibly LDAP integration, http auth - [X] Package_check integration - [X] On backup/remove/upgrade : check for database location to update settings - [ ] enable magic link +- [ ] Add cronjob to reload database ## LICENSE diff --git a/check_process b/check_process index 1f41b77..6da2504 100644 --- a/check_process +++ b/check_process @@ -43,7 +43,7 @@ Level 1=auto Level 2=auto Level 3=auto - Level 4=na + Level 4=1 Level 5=auto Level 6=auto Level 7=auto diff --git a/conf/app.src b/conf/app.src index c765e11..d238056 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,4 +1,3 @@ -#useless as long as V1.0 not issued -SOURCE_URL=https://github.com/janeczku/calibre-web/archive/d0fd1a46014006138977398ee65f48c98df937e7.zip -SOURCE_SUM=0d297719f32670840fb1fcee52d3e73fa6213127709809d9a232f862d037af03 +SOURCE_URL=https://github.com/janeczku/calibre-web/archive/9e5fa45df7cd840d8a26d25f953857a13d6bc5de.zip +SOURCE_SUM=be288d5caa3ccdd612b66927b0849899107941f600a58dd2e0a3dc04feb594a2 SOURCE_FORMAT=zip diff --git a/conf/generate_password_hash.py b/conf/generate_password_hash.py index 6d45018..4778e8c 100644 --- a/conf/generate_password_hash.py +++ b/conf/generate_password_hash.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # Permet de générer le hash pour le password +#Plus utilisé depuis la MAJ 0.92~ynh3 avec LDAP import sys path=sys.argv[2] sys.path.append(path) diff --git a/conf/init_calibre_db_ldap_settings b/conf/init_calibre_db_ldap_settings new file mode 100644 index 0000000..d16c8e9 --- /dev/null +++ b/conf/init_calibre_db_ldap_settings @@ -0,0 +1,3 @@ +config_use_ldap=1, +config_ldap_provider_url=\'localhost:389\', +config_ldap_dn=\'uid=%s,ou=users,dc=yunohost,dc=org\' \ No newline at end of file diff --git a/conf/init_calibre_db_settings b/conf/init_calibre_db_settings index 8dacf91..b54e177 100644 --- a/conf/init_calibre_db_settings +++ b/conf/init_calibre_db_settings @@ -8,4 +8,4 @@ config_use_goodreads=0, config_logfile=\'\', config_converterpath=\'\', config_calibre=\'\', -config_uploading=\'$upload\' \ No newline at end of file +config_uploading=\'$upload\', diff --git a/conf/nginx.conf b/conf/nginx.conf index 75e244a..64bc976 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,12 +4,13 @@ location __PATH__ { if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } - proxy_pass http://localhost:__PORT__; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Scheme $scheme; - proxy_set_header X-Script-Name __PATH__; + proxy_pass http://localhost:__PORT__; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Script-Name __PATH__; + proxy_set_header X-Remote-User $remote_user; # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; diff --git a/hooks/post_user_create b/hooks/post_user_create new file mode 100644 index 0000000..23a6b1a --- /dev/null +++ b/hooks/post_user_create @@ -0,0 +1,49 @@ +#!/bin/bash + +# Source YunoHost helpers +source /usr/share/yunohost/helpers + +#pour récupérer l'app_id, on prend le nom du fichier puis on retire les 3 premiers caratères +app=`basename "$0"` +app=${app:3} +source /etc/yunohost/apps/$app/scripts/_common.sh + + +username=$1 +mail=$2 +pass_clear=$3 +final_path=$(ynh_app_setting_get $app final_path) + +public_library=$(ynh_app_setting_get "$app" public_library) +#User are duplicated in the database only if library is public +if [ public_library -eq 1 ]; then + ###################################### + #1 get admin user and id from database + ###################################### + #we take the admin user as we're sure there is at least this one + + admin=$(ynh_app_setting_get $app admin) + admin_id=$(sqlite3 $final_path/app.db "SELECT id FROM user WHERE nickname='$admin'") + + ###################################### + #get user table structure + ###################################### + table_schema=$(get_db "user") + + ###################################### + #Build new entry for user + ###################################### + insert_user=$table_schema + insert_user="${insert_user/id/null}" #so that a new entry is created + insert_user="${insert_user/nickname/\'$username\'}" + insert_user="${insert_user/role/0}" #standard role + pass_hash=$(python /etc/yunohost/apps/$app/conf/generate_password_hash.py "$pass_clear" $final_path/vendor) + insert_user="${insert_user/password/\'$pass_hash\'}" #we get the same pass even if it's not thanks to LDAP, ones never knows... + insert_user="${insert_user/email/\'$mail\'}" + + ####################################### + # Insert New entry in database + ####################################### + + sqlite3 $final_path/app.db "INSERT INTO user ($table_schema) SELECT $insert_user FROM user WHERE ID = $admin_id;" +fi \ No newline at end of file diff --git a/hooks/post_user_delete b/hooks/post_user_delete new file mode 100644 index 0000000..03d072a --- /dev/null +++ b/hooks/post_user_delete @@ -0,0 +1,38 @@ +#!/bin/bash +# Source YunoHost helpers +source /usr/share/yunohost/helpers + +#pour récupérer l'app_id, on prend le nom du fichier puis on retire les 3 premiers caratères +app=`basename "$0"` +app=${app:3} +source /etc/yunohost/apps/$app/scripts/_common.sh + +username=$1 +final_path=$(ynh_app_setting_get $app final_path) +del_tables_user="book_read_link remote_auth_token downloads shelf bookmark" +del_tables_shelf="book_shelf_link" + +del_id() { + #$1=table + #$2=id_type + #$3=id + sqlite3 $final_path/app.db "DELETE FROM $1 WHERE $2='$3'" +} + + +user_id=$(sqlite3 $final_path/app.db "SELECT id from user WHERE nickname='$username'") +shelf_id=$(sqlite3 $final_path/app.db "SELECT id from shelf WHERE user_id='$user_id'") + +#Delete all entry with dependencies for user +#pas de check sur l'existence de l'utilisateur car fonctionne sans +for i in $del_tables_shelf +do + del_id "$i" "shelf" $shelf_id +done +for i in $del_tables_user +do + del_id "$i" "user_id" $user_id +done + +#delete user +del_id "user" "id" $user_id \ No newline at end of file diff --git a/manifest.json b/manifest.json index 598865b..783924c 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Calibre-web for Yunohost", "fr": "Calibre-web pour Yunohost" }, - "version": "0.91~ynh2", + "version": "0.92~ynh3", "url": "https://github.com/janeczku/calibre-web", "license": "free", "maintainer": { @@ -14,7 +14,7 @@ "email": "misterl56@hotmail.com" }, "requirements": { - "yunohost": ">= 2.7.14" + "yunohost": ">= 3.0.0" }, "multi_instance": true, "services": [ @@ -40,18 +40,6 @@ }, "example": "/calibre", "default": "/calibre" - }, - { - "name": "calibre_path", - "ask": { - "en": "Select the folder containing the Calibre library", - "fr": "Choisissez le répertoire contenant la bibliothèque Calibre" - }, - "help": { - "en": "This folder should have read write access. It will be created if it does not exist.", - "fr": "Le répertoire doit être accessible en lecture écriture, il sera créé s'il n'existe pas." - }, - "default": "/home/yunohost.app/calibreweb" }, { "name": "admin", @@ -69,34 +57,53 @@ "en": "Is it a public application?", "fr": "Est-ce une application publique ?" }, + "help":{ + "en":"No will set the library in /home/yunohost.multimedia/admin/eBook, except if you set the library as public", + "fr":"Non parametrera la bibliothèque pour /home/yunohost.multimedia/admin/eBook sauf si la bibliothèque est également publique" + }, "default": false }, { "name": "language", + "optional": true, "ask": { - "en": "Select a default language (you may change it later in the app)", - "fr": "Choisissez une langue par défaut (vous pourrez la changer ultérieurement dans l'application)" + "en": "Select a default language", + "fr": "Choisissez une langue par défaut" }, - "choices": [ "fr", "en", "es", "de"], + "help":{ + "en":"You may change it later in the app", + "fr":"Vous pourrez la changer ultérieurement dans l'application" + }, + "choices": [ "fr", "en", "es", "de"], "default": "fr" }, { "name": "upload", - "type":"boolean", + "type":"boolean", + "optional": true, "ask": { - "en": "Do you want to allow uploading of books (you may change it later in the app)?", - "fr": "Voulez vous autoriser l'upload de livres (vous pourrez le changer ultérieurement dans l'application)?" + "en": "Do you want to allow uploading of books?", + "fr": "Voulez vous autoriser l'upload de livres?" + }, + "help":{ + "en":"You may change it later in the app", + "fr":"Vous pourrez le changer ultérieurement dans l'application" }, "default": false }, { - "name": "password", - "type": "password", + "name": "public_library", + "type":"boolean", + "optional": true, "ask": { - "en": "Set the administrator password", - "fr": "Définissez le mot de passe administrateur" + "en": "Do you want to allow access to the library to all Yunohost users? ", + "fr": "Voulez vous autoriser l'accès à la bibliothèque à tous les utilisateurs Yunohost?" }, - "example": "Averystrongpassword" + "help":{ + "en":"Yes will set the library in /home/yunohost.multimedia/share/eBook", + "fr":"Oui parametrera la bibliothèque pour /home/yunohost.multimedia/share/eBook" + }, + "default": true } ] } diff --git a/scripts/_common.sh b/scripts/_common.sh index 12deedc..6d2551a 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,8 +1,19 @@ #!/bin/bash -pkg_dependencies="sqlite3 python-pip imagemagick" +PKG_DEPENDENCIES="sqlite3 python-pip imagemagick" +DOSSIER_MEDIA=/home/yunohost.multimedia create_dir=0 +get_db() { + # $1 = nom de la table + # cette ligne de malade : + # 1/ Recupere le schém de la table user + # 2/ En extrait les noms de champs (en prenant le premier mot après la tabulation) + # 3/ en supprime les clé UNIQUE, PRIMARY et CHECK dont on ne veut pas + # 4/ remplace la liste avec retour à la ligne par une liste séparé par des virgules + # 5/ Enlève la dernière virgule + sqlite3 $final_path/app.db ".schema $1" | awk '/\t/ {print $1}' | grep -v -e "UNIQUE" -e "PRIMARY" -e "CHECK" -e "FOREIGN" | awk '{printf "%s, ", $0}' | head -c -2 +} #================================================= # EXPERIMENTAL HELPERS @@ -100,11 +111,11 @@ ynh_systemd_action() { # # usage: ynh_multimedia_build_main_dir ynh_multimedia_build_main_dir () { - local ynh_media_release="v1.1" - local checksum="9ec4321a92aa2c388af4ee0072735e3e" + local ynh_media_release="v1.2" + local checksum="806a827ba1902d6911095602a9221181" # Download yunohost.multimedia scripts - wget -nv https://github.com/YunoHost-Apps/yunohost.multimedia/archive/${ynh_media_release}.tar.gz + wget -nv https://github.com/Yunohost-Apps/yunohost.multimedia/archive/${ynh_media_release}.tar.gz # Check the control sum echo "${checksum} ${ynh_media_release}.tar.gz" | md5sum -c --status \ diff --git a/scripts/change_url b/scripts/change_url index 8a5b158..369c1b6 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -71,7 +71,7 @@ then path_url="$new_path" #Cannot use empty string for X-script-name, causes an issue in the python prg if [ $path_url = "/" ] ; then - ynh_replace_string "X-Script-Name __PATH__;" "X-Script-Name /$app;" ../conf/nginx.conf + ynh_replace_string " proxy_set_header X-Script-Name" "# proxy_set_header X-Script-Name" ../conf/nginx.conf fi # Create a dedicated nginx config ynh_add_nginx_config diff --git a/scripts/install b/scripts/install index b235d84..2600de5 100755 --- a/scripts/install +++ b/scripts/install @@ -25,13 +25,13 @@ path_url=$YNH_APP_ARG_PATH admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC language=$YNH_APP_ARG_LANGUAGE -ynh_print_OFF -pass=$YNH_APP_ARG_PASSWORD -ynh_print_ON app=$YNH_APP_INSTANCE_NAME -#removing / at the end for consistency -calibre_dir=${3%/} -upload=$7 +upload=$6 +public_library=$7 +#if app is public, we assume library is public +if [ $is_public -eq 1 ]; then + public_library=1 +fi #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS @@ -56,7 +56,7 @@ ynh_app_setting_set $app domain $domain ynh_app_setting_set $app path $path_url ynh_app_setting_set $app admin $admin ynh_app_setting_set $app is_public $is_public -ynh_app_setting_set $app calibre_dir $calibre_dir + #================================================= # STANDARD MODIFICATIONS @@ -80,13 +80,12 @@ ynh_print_info "Downloading sources to $final_path" # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source "$final_path" - #================================================= # INSTALL DEPENDENCIES #================================================= ynh_print_info "Installing dependencies and pip packages" -ynh_install_app_dependencies $pkg_dependencies +ynh_install_app_dependencies $PKG_DEPENDENCIES pip install --target $final_path/vendor -r $final_path/requirements.txt #================================================= @@ -94,7 +93,7 @@ pip install --target $final_path/vendor -r $final_path/requirements.txt #================================================= #Cannot use empty string for X-script-name, causes an issue in the python prg if [ $path_url = "/" ] ; then - ynh_replace_string "X-Script-Name __PATH__;" "X-Script-Name /$app;" ../conf/nginx.conf + ynh_replace_string " proxy_set_header X-Script-Name" "# proxy_set_header X-Script-Name" ../conf/nginx.conf fi # Create a dedicated nginx config @@ -120,25 +119,30 @@ ynh_add_systemd_config # CREATE FILES AND DIRECTORIES #================================================= +#Logic is as follow : if app is set to be publicly accessible, we will assume that the library should be set in "Share" multimedia directory +# If app is set to be private but access is requested for all user, we will assume the same +# If app is set to be private but access is limited to the admin user, we will set it inside his own multimedia directory. +# Access to the app is managed in the SSOwat part of the script. -#Check if library folder exists. If not create it -if [ ! -e "$calibre_dir" ]; then - ynh_print_info "Create calibre library folder $calibre_dir" - mkdir -p $calibre_dir - chown -R $app:$app $calibre_dir - create_dir=1 +#build multimedia directory +ynh_multimedia_build_main_dir +ynh_multimedia_addaccess $app + +if [ $is_public -eq 1 ]; then #app is public, library is public + calibre_dir=$DOSSIER_MEDIA/share/eBook +elif [ $is_public -eq 0 ] && [ $public_library -eq 1 ]; then #app is private, library is public + calibre_dir=$DOSSIER_MEDIA/share/eBook +else #app is private, library is private + calibre_dir=$DOSSIER_MEDIA/$admin/eBook 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 chown $app:$app $calibre_dir/* fi - -#ynh_multimedia_build_main_dir -#ynh_multimedia_addfolder "eBook" "$calibre_dir" -#ynh_multimedia_addaccess $app - +ynh_app_setting_set $app calibre_dir $calibre_dir #================================================= # SETUP LOGROTATE @@ -158,25 +162,52 @@ chown -R $app:$app /var/log/$app ynh_print_info "Setting up database and settings" #we need to start and stop the service so that initial app.db file is created and that we can set default data ynh_systemd_action -l "INFO in server: Starting Gevent server" -#systemctl start $app + #sleep required on low spec like raspberryPi sleep 2s ynh_systemd_action -a stop #set database settings as per conf file -conf="\"UPDATE settings SET $(. <(echo -E echo $(<../conf/init_calibre_db_settings))) WHERE ID=1\"" +conf="\"UPDATE settings SET $(. <(echo -E echo $(<../conf/init_calibre_db_settings))) $(. <(echo -E echo $(<../conf/init_calibre_db_ldap_settings))) WHERE ID=1\"" eval sqlite3 $final_path/app.db "$conf" conf="\"UPDATE user SET $(. <(echo -E echo $(<../conf/init_calibre_db_user))) WHERE ID=1\"" eval sqlite3 $final_path/app.db "$conf" #mise à jour du mot de passe (je ne sais pas pourquoi, je n'arrive pas à l'intégrer dans le fichier de conf, pb de " et ') -ynh_print_OFF +#ynh_print_OFF #had to set it on two lines or package_linter cries like a baby... -pass=$(python ../conf/generate_password_hash.py "$pass" $final_path/vendor) -sqlite3 $final_path/app.db "UPDATE user SET password='$pass' WHERE ID=1" -ynh_print_ON +#pass=$(python ../conf/generate_password_hash.py "$pass" $final_path/vendor) +#sqlite3 $final_path/app.db "UPDATE user SET password='$pass' WHERE ID=1" +#ynh_print_ON + +#Creation des autres utilisateurs +if [ $public_library -eq 1 ]; then + table_schema=$(get_db "user") + + for i in $(ynh_user_list); do + if [ $i = $admin ]; then continue; fi + mail=$(ynh_user_get_info $i 'mail') + ###################################### + #Build new entry for user + ###################################### + insert_user=$table_schema + insert_user="${insert_user/id/null}" #so that a new entry is created + insert_user="${insert_user/nickname/\'$i\'}" + insert_user="${insert_user/role/0}" #standard role + # pass_hash=$(python /etc/yunohost/apps/$app/conf/generate_password_hash.py "$pass_clear" $final_path/vendor) + # insert_user="${insert_user/password/\'$pass_hash\'}" #we get the same pass even if it's not thanks to LDAP, ones never knows... + insert_user="${insert_user/email/\'$mail\'}" + + ####################################### + # Insert New entry in database + ####################################### + + sqlite3 $final_path/app.db "INSERT INTO user ($table_schema) SELECT $insert_user FROM user WHERE ID = 1;" + + done +fi #================================================= # SECURE FILES AND DIRECTORIES @@ -211,6 +242,11 @@ then # unprotected_uris allows SSO credentials to be passed anyway. ynh_app_setting_set $app unprotected_uris "/" fi +if [ $public_library -eq 0 ]; then + yunohost app addaccess $app -u $admin +fi + + #================================================= # RELOAD NGINX @@ -218,11 +254,3 @@ fi ynh_print_info "Reload nginx and start $app" systemctl reload nginx ynh_systemd_action -l "INFO in server: Starting Gevent server" - -#================================================= -# WARNING FOR READ ACCESS -#================================================= - -if [[ $create_dir = 0 ]] ; then - ynh_print_warn "Please, give required access to $app user to the $calibre_dir folder." -fi \ No newline at end of file diff --git a/scripts/restore b/scripts/restore index 3c6de79..4f9c05f 100755 --- a/scripts/restore +++ b/scripts/restore @@ -88,7 +88,7 @@ chown -R $app: $final_path # Define and install dependencies ynh_print_info "Installing dependencies and pip packages" -ynh_install_app_dependencies $pkg_dependencies +ynh_install_app_dependencies $PKG_DEPENDENCIES pip install --target $final_path/vendor -r $final_path/requirements.txt #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 875de9c..0c037a6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -44,6 +44,9 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#Stop the app in case database is updated +ynh_systemd_action -a stop + #================================================= # CHECK THE PATH #================================================= @@ -65,14 +68,18 @@ ynh_setup_source "$final_path" # NGINX CONFIGURATION #================================================= +if [ $path_url = "/" ] ; then + ynh_replace_string " proxy_set_header X-Script-Name" "# proxy_set_header X-Script-Name" ../conf/nginx.conf +fi + # Create a dedicated nginx config ynh_add_nginx_config #================================================= # UPGRADE DEPENDENCIES #================================================= - -ynh_install_app_dependencies $pkg_dependencies +ynh_print_info "Download and install dependencies" +ynh_install_app_dependencies $PKG_DEPENDENCIES pip install --target $final_path/vendor -r $final_path/requirements.txt #================================================= @@ -82,16 +89,36 @@ pip install --target $final_path/vendor -r $final_path/requirements.txt # Create a dedicated user (if not existing) ynh_system_user_create $app +# Set permissions on app files (required to be able to update database) +chown -R $app: $final_path #================================================= # SPECIFIC UPGRADE #================================================= -# ... +#build multimedia directory +#================================================= + +#Create multimedia directory but we do not change the calibre_dir : It's the user to make this choice. +ynh_multimedia_build_main_dir +ynh_multimedia_addaccess $app + +#================================================= +#Update database structure #================================================= ### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script. ### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it. ynh_backup_if_checksum_is_different "$final_path/app.db" + +#set database settings as per conf file : restart server so that app.db is regenerated, then add new ldap settings +ynh_systemd_action -l "INFO in server: Starting Gevent server" +#sleep required on low spec like raspberryPi +sleep 2s +ynh_systemd_action -a stop + +conf="\"UPDATE settings SET $(. <(echo -E echo $(<../conf/init_calibre_db_ldap_settings))) WHERE ID=1\"" +eval sqlite3 $final_path/app.db "$conf" + # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum "$final_path/app.db" diff --git a/sources/patches/app-config.patch b/sources/patches/app-config.patch new file mode 100644 index 0000000..c816372 --- /dev/null +++ b/sources/patches/app-config.patch @@ -0,0 +1,24 @@ +--- a/cps/templates/config_edit.html 2019-01-12 09:01:08.000000000 +0100 ++++ b/cps/templates/config_edit.html 2019-01-13 11:21:11.000000000 +0100 +@@ -162,6 +162,21 @@ + + + {% endif %} ++