1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/invidious_ynh.git synced 2024-09-03 19:15:55 +02:00
This commit is contained in:
ericgaspar 2020-11-10 11:05:07 +01:00
parent 8680994834
commit c8a2889c0a
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 20 additions and 1 deletions

View file

@ -23,6 +23,8 @@ Invidious is an alternative front-end to YouTube.
## Configuration ## Configuration
You can configure Invidious by modifying the configuration file `/var/www/invidious/config/config.yaml` with the help of this [documentation](https://github.com/iv-org/invidious/wiki/Configuration).
## Documentation ## Documentation
* Official documentation: https://github.com/iv-org/invidious/wiki * Official documentation: https://github.com/iv-org/invidious/wiki

View file

@ -23,6 +23,8 @@ Invidious est une interface alternative à YouTube.
## Configuration ## Configuration
Vous pouvez configurer Invidious en modifiant le fichier de configuration `/var/www/invidious/config/config.yaml` avec l'aide de cette [documentation](https://github.com/iv-org/invidious/wiki/Configuration).
## Documentation ## Documentation
* Documentation officielle : https://github.com/iv-org/invidious/wiki * Documentation officielle : https://github.com/iv-org/invidious/wiki

View file

@ -18,3 +18,16 @@ pkg_dependencies="apt-transport-https libssl-dev libxml2-dev libyaml-dev libgmp-
#================================================= #=================================================
# FUTURE OFFICIAL HELPERS # FUTURE OFFICIAL HELPERS
#================================================= #=================================================
# Execute a command as another user
# usage: ynh_exec_as USER COMMAND [ARG ...]
ynh_exec_as() {
local USER=$1
shift 1
if [[ $USER = $(whoami) ]]; then
eval "$@"
else
sudo -u "$USER" "$@"
fi
}

View file

@ -73,6 +73,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading source files..." --weight=5 ynh_script_progression --message="Upgrading source files..." --weight=5
ynh_exec_as $app (
pushd "$final_path" || ynh_die pushd "$final_path" || ynh_die
currentVersion=$(git rev-list --max-count=1 --abbrev-commit HEAD) currentVersion=$(git rev-list --max-count=1 --abbrev-commit HEAD)
git pull git pull
@ -82,6 +83,7 @@ pushd "$final_path" || ynh_die
exit exit
popd || ynh_die popd || ynh_die
fi fi
)
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION