1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/invidious_ynh.git synced 2024-09-03 19:15:55 +02:00
- Fix Crystal version
This commit is contained in:
Éric Gaspar 2021-03-30 08:27:04 +02:00 committed by GitHub
parent 4bdf2f965c
commit 8f6274ae53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 25 additions and 23 deletions

View file

@ -28,7 +28,7 @@ You can configure Invidious by modifying the configuration file `/var/www/invidi
## Documentation ## Documentation
* Official documentation: https://github.com/iv-org/documentation * Official documentation: https://github.com/iv-org/documentation
* YunoHost documentation: https://yunohost.org/#/app_invidious * YunoHost documentation: https://yunohost.org/en/app_invidious
## YunoHost specific features ## YunoHost specific features

View file

@ -28,7 +28,7 @@ Vous pouvez configurer Invidious en modifiant le fichier de configuration `/var/
## Documentation ## Documentation
* Documentation officielle : https://github.com/iv-org/documentation * Documentation officielle : https://github.com/iv-org/documentation
* Documentation YunoHost : https://yunohost.org/#/app_invidious_fr * Documentation YunoHost : https://yunohost.org/fr/app_invidious
## Caractéristiques spécifiques YunoHost ## Caractéristiques spécifiques YunoHost

View file

@ -14,7 +14,6 @@
upgrade=1 upgrade=1
backup_restore=1 backup_restore=1
multi_instance=0 multi_instance=0
port_already_use=0
change_url=0 change_url=0
;;; Options ;;; Options
Email= Email=

0
conf/app.src Normal file
View file

View file

@ -6,14 +6,14 @@
"en": "Alternative front-end to YouTube", "en": "Alternative front-end to YouTube",
"fr": "Front-end alternatif à YouTube" "fr": "Front-end alternatif à YouTube"
}, },
"version": "0.20.1~ynh6", "version": "0.20.1~ynh8",
"url": "https://invidio.us/", "url": "https://invidio.us/",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"maintainer": { "maintainer": {
"name": "eric_G" "name": "eric_G"
}, },
"requirements": { "requirements": {
"yunohost": ">= 4.0.0" "yunohost": ">= 4.1.7"
}, },
"multi_instance": false, "multi_instance": false,
"services": [ "services": [
@ -24,19 +24,11 @@
{ {
"name": "domain", "name": "domain",
"type": "domain", "type": "domain",
"ask": {
"en": "Choose a domain name for Invidious",
"fr": "Choisissez un nom de domaine pour Invidious"
},
"example": "domain.org" "example": "domain.org"
}, },
{ {
"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 enabled, Invidious will be accessible by people who do not have an account. This can be changed later via the webadmin.", "en": "If enabled, Invidious will be accessible by people who do not have an account. This can be changed later via the webadmin.",
"fr": "Si cette case est cochée, Invidious sera accessible aux personnes nayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." "fr": "Si cette case est cochée, Invidious sera accessible aux personnes nayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."

View file

@ -5,7 +5,7 @@
#================================================= #=================================================
# dependencies used by the app # dependencies used by the app
pkg_dependencies="crystal apt-transport-https libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev postgresql librsvg2-bin libsqlite3-dev zlib1g-dev" pkg_dependencies="apt-transport-https libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev postgresql librsvg2-bin libsqlite3-dev zlib1g-dev" #crystal
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS

View file

@ -66,8 +66,10 @@ ynh_app_setting_set --app=$app --key=port --value=$port
#================================================= #=================================================
ynh_script_progression --message="Installing dependencies..." --weight=9 ynh_script_progression --message="Installing dependencies..." --weight=9
ynh_exec_warn_less apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61 #ynh_exec_warn_less apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61
ynh_install_extra_repo --repo="deb https://dl.bintray.com/crystal/deb all stable" --append #ynh_install_extra_repo --repo="deb https://dl.bintray.com/crystal/deb all stable" --append
ynh_exec_warn_less curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --crystal=0.36
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
@ -131,7 +133,6 @@ popd || ynh_die
ynh_script_progression --message="Modifying a config file..." ynh_script_progression --message="Modifying a config file..."
ynh_add_config --template="../conf/config.yml" --destination="$final_path/config/config.yml" ynh_add_config --template="../conf/config.yml" --destination="$final_path/config/config.yml"
ynh_store_file_checksum --file="$final_path/config/config.yml"
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD

View file

@ -32,6 +32,18 @@ ynh_script_progression --message="Checking version..."
upgrade_type=$(ynh_check_app_version_changed) upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
@ -60,8 +72,10 @@ ynh_systemd_action --service_name=$app --action=stop --log_path=systemd
#================================================= #=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=8 ynh_script_progression --message="Upgrading dependencies..." --weight=8
ynh_exec_warn_less apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61 #ynh_exec_warn_less apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61
ynh_install_extra_repo --repo="deb https://dl.bintray.com/crystal/deb all stable" --append #ynh_install_extra_repo --repo="deb https://dl.bintray.com/crystal/deb all stable" --append
ynh_exec_warn_less curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --crystal=0.36
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
@ -103,12 +117,8 @@ ynh_system_user_create --username=$app
#================================================= #=================================================
ynh_script_progression --message="Modifying a config file..." --weight=3 ynh_script_progression --message="Modifying a config file..." --weight=3
ynh_backup_if_checksum_is_different --file="$final_path/config/config.yml"
ynh_add_config --template="../conf/config.yml" --destination="$final_path/config/config.yml" ynh_add_config --template="../conf/config.yml" --destination="$final_path/config/config.yml"
ynh_store_file_checksum --file="$final_path/config/config.yml"
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
#================================================= #=================================================