From 70ff1ba0fc49e643b77a1172a7bab885cadab50a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 26 Jul 2021 07:43:39 +0200 Subject: [PATCH] Fix --- check_process | 12 ++++---- manifest.json | 14 +-------- scripts/_common.sh | 77 ---------------------------------------------- scripts/install | 2 +- scripts/upgrade | 2 +- 5 files changed, 9 insertions(+), 98 deletions(-) diff --git a/check_process b/check_process index 33ceb3d..a3c2682 100644 --- a/check_process +++ b/check_process @@ -1,8 +1,8 @@ ;; Test complet avec Infcloud ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - admin="john" (USER) + domain="domain.tld" + path="/path" + admin="john" infcloud=1 language="French" ; Checks @@ -21,9 +21,9 @@ change_url=0 ;; Test sans Infcloud ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - admin="john" (USER) + domain="domain.tld" + path="/path" + admin="john" infcloud=0 language="French" ; Checks diff --git a/manifest.json b/manifest.json index f7ae9bb..ad18fdb 100644 --- a/manifest.json +++ b/manifest.json @@ -18,7 +18,7 @@ "email": "maniackc_dev@crudelis.fr" }], "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.2.0" }, "multi_instance": false, "services": [ @@ -30,29 +30,17 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain for Radicale", - "fr": "Choisissez un domaine pour Radicale" - }, "example": "domain.org" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Radicale", - "fr": "Choisissez un chemin pour Radicale" - }, "example": "/radicale", "default": "/radicale" }, { "name": "admin", "type": "user", - "ask": { - "en": "Choose the administrator (must be an existing YunoHost user)", - "fr": "Choisissez un administrateur (doit ĂȘtre un utilisateur YunoHost)" - }, "example": "john" }, { diff --git a/scripts/_common.sh b/scripts/_common.sh index 5865b83..09ff99e 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -38,83 +38,6 @@ bool_to_true_false () { # FUTUR OFFICIAL HELPERS #================================================= -# Install or update the main directory yunohost.multimedia -# -# usage: ynh_multimedia_build_main_dir -ynh_multimedia_build_main_dir () { - 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 2>&1 - - # Check the control sum - echo "${checksum} ${ynh_media_release}.tar.gz" | md5sum -c --status \ - || ynh_die "Corrupt source" - - # Check if the package acl is installed. Or install it. - ynh_package_is_installed 'acl' \ - || ynh_package_install acl - - # Extract - mkdir yunohost.multimedia-master - tar -xf ${ynh_media_release}.tar.gz -C yunohost.multimedia-master --strip-components 1 - ./yunohost.multimedia-master/script/ynh_media_build.sh -} - -# Add a directory in yunohost.multimedia -# This "directory" will be a symbolic link to a existing directory. -# -# usage: ynh_multimedia_addfolder "Source directory" "Destination directory" -# -# | arg: -s, --source_dir= - Source directory - The real directory which contains your medias. -# | arg: -d, --dest_dir= - Destination directory - The name and the place of the symbolic link, relative to "/home/yunohost.multimedia" -ynh_multimedia_addfolder () { - # Declare an array to define the options of this helper. - declare -Ar args_array=( [s]=source_dir= [d]=dest_dir= ) - local source_dir - local dest_dir - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - - ./yunohost.multimedia-master/script/ynh_media_addfolder.sh --source="$source_dir" --dest="$dest_dir" -} - -# Move a directory in yunohost.multimedia, and replace by a symbolic link -# -# usage: ynh_multimedia_movefolder "Source directory" "Destination directory" -# -# | arg: -s, --source_dir= - Source directory - The real directory which contains your medias. -# It will be moved to "Destination directory" -# A symbolic link will replace it. -# | arg: -d, --dest_dir= - Destination directory - The new name and place of the directory, relative to "/home/yunohost.multimedia" -ynh_multimedia_movefolder () { - # Declare an array to define the options of this helper. - declare -Ar args_array=( [s]=source_dir= [d]=dest_dir= ) - local source_dir - local dest_dir - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - - ./yunohost.multimedia-master/script/ynh_media_addfolder.sh --inv --source="$source_dir" --dest="$dest_dir" -} - -# Allow an user to have an write authorisation in multimedia directories -# -# usage: ynh_multimedia_addaccess user_name -# -# | arg: -u, --user_name= - The name of the user which gain this access. -ynh_multimedia_addaccess () { - # Declare an array to define the options of this helper. - declare -Ar args_array=( [u]=user_name=) - local user_name - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - - groupadd -f multimedia - usermod -a -G multimedia $user_name -} - #================================================= # EXPERIMENTAL HELPERS diff --git a/scripts/install b/scripts/install index db3d745..ccba050 100755 --- a/scripts/install +++ b/scripts/install @@ -81,7 +81,7 @@ then # Add InfCloud in NGINX config ynh_replace_string "#INFCLOUD#" "" /etc/nginx/conf.d/$domain.d/$app.conf fi -ynh_store_file_checksum "$finalnginxconf" +ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # CREATE DEDICATED USER diff --git a/scripts/upgrade b/scripts/upgrade index 6993aab..3192503 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -165,7 +165,7 @@ then # Add InfCloud in NGINX config ynh_replace_string "#INFCLOUD#" "" /etc/nginx/conf.d/$domain.d/$app.conf fi - ynh_store_file_checksum "$finalnginxconf" + ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf" fi #=================================================