diff --git a/conf/app.src b/conf/app.src
deleted file mode 100644
index 11900b9..0000000
--- a/conf/app.src
+++ /dev/null
@@ -1,7 +0,0 @@
-SOURCE_URL=https://framagit.org/fiat-tux/hat-softwares/lutim/-/archive/0.12.1/lutim-0.12.1.tar.gz
-SOURCE_SUM=141f142d47e3a8367e0c292304ddbecfc34b49ae7e561e2c3526000040318973
-SOURCE_SUM_PRG=sha256sum
-SOURCE_FORMAT=tar.gz
-SOURCE_IN_SUBDIR=true
-SOURCE_FILENAME=
-SOURCE_EXTRACT=true
diff --git a/conf/cron_lutim b/conf/cron_lutim
index f96f975..ee69a65 100644
--- a/conf/cron_lutim
+++ b/conf/cron_lutim
@@ -1,11 +1,11 @@
# Génération des statistiques. Tous les jours, à 5h.
-0 5 * * * __APP__ cd "__FINALPATH__" && $(which carton) exec script/lutim cron stats
+0 5 * * * __APP__ cd "__INSTALL_DIR__" && $(which carton) exec script/lutim cron stats
# Suppression des adresses IP obsolètes. Tous les jours, à 6h.
-0 6 * * * __APP__ cd "__FINALPATH__" && $(which carton) exec script/lutim cron cleanbdd
+0 6 * * * __APP__ cd "__INSTALL_DIR__" && $(which carton) exec script/lutim cron cleanbdd
# Suppression des images dont le délai a expiré. Tous les jours, à 6h.
-0 6 * * * __APP__ cd "__FINALPATH__" && $(which carton) exec script/lutim cron cleanfiles
+0 6 * * * __APP__ cd "__INSTALL_DIR__" && $(which carton) exec script/lutim cron cleanfiles
# Vérification de l'occupation du dossier des images. Tous les jours, à 7h.
-0 7 * * * __APP__ cd "__FINALPATH__" && $(which carton) exec script/lutim cron watch
+0 7 * * * __APP__ cd "__INSTALL_DIR__" && $(which carton) exec script/lutim cron watch
diff --git a/conf/systemd.service b/conf/systemd.service
index 23707fa..8b7b33b 100644
--- a/conf/systemd.service
+++ b/conf/systemd.service
@@ -6,8 +6,8 @@ After=network.target
Type=forking
User=__APP__
Group=__APP__
-WorkingDirectory=__FINALPATH__/
-PIDFile=__FINALPATH__/script/hypnotoad.pid
+WorkingDirectory=__INSTALL_DIR__/
+PIDFile=__INSTALL_DIR__/script/hypnotoad.pid
ExecStart=/usr/bin/carton exec hypnotoad script/lutim >> /var/log/lutim/production.log 2>&1
ExecStop=/usr/bin/carton exec hypnotoad -s script/lutim >> /var/log/lutim/production.log 2>&1
ExecReload=/usr/bin/carton exec hypnotoad script/lutim >> /var/log/lutim/production.log 2>&1
diff --git a/manifest.toml b/manifest.toml
new file mode 100644
index 0000000..abdd5b4
--- /dev/null
+++ b/manifest.toml
@@ -0,0 +1,64 @@
+packaging_format = 2
+
+id = "lutim"
+name = "Lutim"
+description.en = "Anonymous image hosting service"
+description.fr = "Service d'hébergement anonyme d'images"
+
+version = "0.12.1~ynh4"
+
+maintainers = []
+
+[upstream]
+license = "AGPL-3.0-only"
+website = "https://lut.im"
+demo = "https://lut.im/"
+userdoc = "https://framagit.org/luc/lutim/wikis/home"
+code = "https://framagit.org/fiat-tux/hat-softwares/lutim"
+cpe = "???" # FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is sort of a standard id for applications defined by the NIST. In particular, Yunohost may use this is in the future to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here: https://nvd.nist.gov/products/cpe/search. For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number)
+fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin.
+
+[integration]
+yunohost = ">= 4.3.0"
+architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"]
+multi_instance = false
+ldap = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "sso" key : the "ldap" key corresponds to wether or not a user *can* login on the app using its YunoHost credentials.
+sso = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "ldap" key : the "sso" key corresponds to wether or not a user is *automatically logged-in* on the app when logged-in on the YunoHost portal.
+disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ...
+ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ...
+ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ...
+
+[install]
+ [install.domain]
+ # this is a generic question - ask strings are automatically handled by Yunohost's core
+ type = "domain"
+
+ [install.path]
+ # this is a generic question - ask strings are automatically handled by Yunohost's core
+ type = "path"
+ default = "/lutim"
+
+ [install.init_main_permission]
+ help.en = "If you set Lutim as public, everyone will be able to upload images and share them.
But even if not public, everyone can see an image from a link shared with your Lutim."
+ help.fr = "Si vous définissez Lutim comme public, tout le monde pourra télécharger des images et les partager.
Mais même si ce n'est pas public, tout le monde peut voir une image à partir d'un lien partagé avec votre Lutim."
+ type = "group"
+ default = false
+
+ [install.always_encrypt]
+ ask.en = "Force the encryption of images?"
+ ask.fr = "Forcer le chiffrement des images ?"
+ type = "boolean"
+ default = true
+
+[resources]
+ [resources.sources.main]
+ url = "https://framagit.org/fiat-tux/hat-softwares/lutim/-/archive/0.12.1/lutim-0.12.1.tar.gz"
+ sha256 = "141f142d47e3a8367e0c292304ddbecfc34b49ae7e561e2c3526000040318973"
+
+
+ [resources.system_user]
+
+ [resources.install_dir]
+
+ [resources.permissions]
+ main.url = "/"
diff --git a/scripts/_common.sh b/scripts/_common.sh
index 79b3e7d..aad5eb0 100755
--- a/scripts/_common.sh
+++ b/scripts/_common.sh
@@ -5,7 +5,7 @@
#=================================================
# dependencies used by the app
-pkg_dependencies="carton perlmagick libpq-dev shared-mime-info"
+#REMOVEME? pkg_dependencies="carton perlmagick libpq-dev shared-mime-info"
#=================================================
# PERSONAL HELPERS
@@ -38,7 +38,7 @@ ynh_send_readme_to_admin() {
type="${type:-install}"
# Get the value of admin_mail_html
- admin_mail_html=$(ynh_app_setting_get $app admin_mail_html)
+#REMOVEME? admin_mail_html=$(ynh_app_setting_get $app admin_mail_html)
admin_mail_html="${admin_mail_html:-0}"
# Retrieve the email of users
@@ -158,12 +158,12 @@ __PRE_TAG1__$(yunohost tools diagnosis | grep -B 100 "services:" | sed '/service
#=================================================
ynh_maintenance_mode_ON () {
- # Load value of $path_url and $domain from the config if their not set
- if [ -z $path_url ]; then
- path_url=$(ynh_app_setting_get $app path)
+ # Load value of $path and $domain from the config if their not set
+ if [ -z $path ]; then
+#REMOVEME? path=$(ynh_app_setting_get $app path)
fi
if [ -z $domain ]; then
- domain=$(ynh_app_setting_get $app domain)
+#REMOVEME? domain=$(ynh_app_setting_get $app domain)
fi
mkdir -p /var/www/html/
@@ -190,10 +190,10 @@ ynh_maintenance_mode_ON () {