mirror of
https://github.com/YunoHost-Apps/privatebin_ynh.git
synced 2024-09-03 20:15:56 +02:00
parent
774eef21cd
commit
8b95e6704d
2 changed files with 20 additions and 15 deletions
|
@ -6,7 +6,7 @@
|
||||||
"en": "Minimalist pastebin where the server has zero knowledge of pasted data",
|
"en": "Minimalist pastebin where the server has zero knowledge of pasted data",
|
||||||
"fr": "Pastebin minimaliste où le serveur n'a aucune connaissance des données copiées"
|
"fr": "Pastebin minimaliste où le serveur n'a aucune connaissance des données copiées"
|
||||||
},
|
},
|
||||||
"version": "1.3.4~ynh2",
|
"version": "1.3.4~ynh3",
|
||||||
"url": "https://github.com/PrivateBin/PrivateBin",
|
"url": "https://github.com/PrivateBin/PrivateBin",
|
||||||
"license": "Zlib",
|
"license": "Zlib",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
"email": "julien.malik@paraiso.me"
|
"email": "julien.malik@paraiso.me"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.0.0"
|
"yunohost": ">= 4.1.7"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
@ -26,29 +26,17 @@
|
||||||
{
|
{
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain",
|
"type": "domain",
|
||||||
"ask": {
|
|
||||||
"en": "Choose a domain for PrivateBin",
|
|
||||||
"fr": "Choisissez un domaine pour PrivateBin"
|
|
||||||
},
|
|
||||||
"example": "domain.org"
|
"example": "domain.org"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "path",
|
"name": "path",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"ask": {
|
|
||||||
"en": "Choose a path for PrivateBin",
|
|
||||||
"fr": "Choisissez un chemin pour PrivateBin"
|
|
||||||
},
|
|
||||||
"example": "/privatebin",
|
"example": "/privatebin",
|
||||||
"default": "/privatebin"
|
"default": "/privatebin"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "is_public",
|
"name": "is_public",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"ask": {
|
|
||||||
"en": "Is it a public site?",
|
|
||||||
"fr": "Est-ce un site public ?"
|
|
||||||
},
|
|
||||||
"help": {
|
"help": {
|
||||||
"en": "If private, only YunoHost users can create a paste, but everyone can read it.",
|
"en": "If private, only YunoHost users can create a paste, but everyone can read it.",
|
||||||
"fr": "Si privé, seul les utilisateurs YunoHost peuvent créer un paste, mais tout le monde peut lire."
|
"fr": "Si privé, seul les utilisateurs YunoHost peuvent créer un paste, mais tout le monde peut lire."
|
||||||
|
|
|
@ -30,6 +30,23 @@ ynh_script_progression --message="Loading installation settings..."
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
|
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1
|
||||||
|
|
||||||
|
# Backup the current version of the app
|
||||||
|
ynh_backup_before_upgrade
|
||||||
|
ynh_clean_setup () {
|
||||||
|
# Remove the new domain config file, the remove script won't do it as it doesn't know yet its location.
|
||||||
|
ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
||||||
|
|
||||||
|
# Restore it if the upgrade fails
|
||||||
|
ynh_restore_upgradebackup
|
||||||
|
}
|
||||||
|
# Exit if an error occurs during the execution of the script
|
||||||
|
ynh_abort_if_errors
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK WHICH PARTS SHOULD BE CHANGED
|
# CHECK WHICH PARTS SHOULD BE CHANGED
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -80,7 +97,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE SSOWAT
|
# UPDATE SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reconfiguring SSOwat..."
|
ynh_script_progression --message="Reconfiguring permissions..."
|
||||||
|
|
||||||
if [ $is_public -eq 0 ]
|
if [ $is_public -eq 0 ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in a new issue