1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/archivebox_ynh.git synced 2024-09-03 18:15:54 +02:00

less warnings

This commit is contained in:
yalh76 2022-09-22 20:53:09 +02:00
parent e33ce7f6f1
commit f2c701f551
5 changed files with 15 additions and 12 deletions

View file

@ -16,7 +16,9 @@
setup_public=1
upgrade=1
# 0.6.2~ynh9
upgrade=1 from_commit=a2d626f966bc358aea53bbe78d9fa2a0e3783c78
upgrade=0 from_commit=a2d626f966bc358aea53bbe78d9fa2a0e3783c78
# 0.6.2~ynh10
upgrade=1 from_commit=719751ec9342e287d65f159349217fe0d498c294
backup_restore=1
multi_instance=1
port_already_use=0

View file

@ -74,8 +74,8 @@ ynh_app_setting_set --app=$app --key=port --value=$port
#=================================================
ynh_script_progression --message="Installing dependencies..." --weight=8
ynh_install_app_dependencies $pkg_dependencies
ynh_install_nodejs --nodejs_version=$nodejs_version
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
#=================================================
# CREATE DEDICATED USER
@ -174,10 +174,10 @@ chown $app:$app "$datadir/ArchiveBox.conf"
ynh_script_progression --message="Initializing Archivebox" --weight=1
pushd $datadir
ynh_exec_as $app $archivebox_cmd init
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $archivebox_cmd init
ynh_script_progression --message="Checking if admin superuser already exists: $admin" --weight=1
USER_EXISTS=$(ynh_exec_as $app $archivebox_cmd manage shell -c "from django.contrib.auth.models import User; print(User.objects.filter(username='$admin').count())")
ynh_exec_warn_less USER_EXISTS=$(ynh_exec_as $app $archivebox_cmd manage shell -c "from django.contrib.auth.models import User; print(User.objects.filter(username='$admin').count())")
ynh_script_progression --message="Found users: $USER_EXISTS" --weight=1
if [ $USER_EXISTS -eq 1 ]
@ -210,7 +210,7 @@ EOF
fi
ynh_script_progression --message="Finishing Archivebox Setup" --weight=1
ynh_exec_as $app $ynh_node_load_PATH $archivebox_cmd init --setup
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $archivebox_cmd init --setup
popd
#=================================================

View file

@ -85,7 +85,7 @@ ynh_remove_nginx_config
ynh_script_progression --message="Removing dependencies..." --weight=1
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
ynh_exec_warn_less ynh_remove_app_dependencies
#=================================================
# SPECIFIC REMOVE

View file

@ -82,8 +82,8 @@ chown -R $app:www-data "$datadir"
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies
ynh_install_nodejs --nodejs_version=$nodejs_version
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
#=================================================
# RESTORE THE NGINX CONFIGURATION

View file

@ -100,8 +100,8 @@ chown -R $app:www-data "$final_path"
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=1
ynh_install_app_dependencies $pkg_dependencies
ynh_install_nodejs --nodejs_version=$nodejs_version
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
#=================================================
# NGINX CONFIGURATION
@ -160,6 +160,7 @@ fi
#=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=1
ynh_store_file_checksum --file="$datadir/ArchiveBox.conf"
ynh_add_config --template="../conf/ArchiveBox.conf" --destination="$datadir/ArchiveBox.conf"
chmod 600 "$datadir/ArchiveBox.conf"
@ -174,7 +175,7 @@ then
# rerun archivebox setup (its idempotent, so it should be ok during upgrade)
ynh_script_progression --message="Finishing Archivebox Setup" --weight=1
pushd $datadir
ynh_exec_as $app $ynh_node_load_PATH $archivebox_cmd init --setup
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $archivebox_cmd init --setup
popd
fi