mirror of
https://github.com/YunoHost-Apps/invidious_ynh.git
synced 2024-09-03 19:15:55 +02:00
Fix
This commit is contained in:
parent
b182a8a6fc
commit
7799d644ad
3 changed files with 13 additions and 28 deletions
|
@ -68,11 +68,7 @@ ynh_script_progression --message="Installing dependencies..." --weight=15
|
|||
|
||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
# tempdir="$(mktemp -d)"
|
||||
# ynh_setup_source --dest_dir=$tempdir --source_id=crystal
|
||||
# ynh_exec_warn_less dpkg -i $tempdir/crystal_1.0.0-1_amd64.deb
|
||||
|
||||
ynh_exec_warn_less curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --channel=nightly
|
||||
ynh_exec_warn_less curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --channel=stable
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
|
|
|
@ -79,7 +79,7 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=7
|
|||
# Define and install dependencies
|
||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --channel=nightly
|
||||
ynh_exec_warn_less curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --channel=stable
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE POSTGRESQL DATABASE
|
||||
|
|
|
@ -74,6 +74,15 @@ ynh_script_progression --message="Making sure dedicated system user exists..." -
|
|||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..." --weight=8
|
||||
|
||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
ynh_exec_warn_less curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --channel=stable
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
@ -82,25 +91,14 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=5
|
||||
|
||||
#tmpdir="$(mktemp -d)"
|
||||
|
||||
# Backup the config file in the temp dir
|
||||
#cp -a "$final_path/config/config.yml" "$tmpdir/config.yml"
|
||||
|
||||
pushd $final_path
|
||||
git fetch
|
||||
#git checkout master
|
||||
git reset --hard --quiet $version_commit
|
||||
git pull
|
||||
shards update && shards install
|
||||
crystal build $final_path/src/invidious.cr --release
|
||||
ynh_exec_warn_less shards update && shards install
|
||||
ynh_exec_warn_less crystal build $final_path/src/invidious.cr --release
|
||||
popd
|
||||
|
||||
# Copy the admin saved settings from tmp directory to final path
|
||||
#cp -a "$tmpdir/config.yml" "$final_path/config/config.yml"
|
||||
|
||||
# Remove the tmp directory securely
|
||||
#ynh_secure_remove --file="$tmpdir"
|
||||
fi
|
||||
|
||||
chmod 750 "$final_path"
|
||||
|
@ -115,15 +113,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
|||
# Create a dedicated nginx config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..." --weight=8
|
||||
|
||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --channel=nightly
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue