1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/listmonk_ynh.git synced 2024-09-03 19:36:15 +02:00

autocreate uploads

This commit is contained in:
navanchauhan 2022-12-27 17:14:34 -05:00
parent 0b50e6619f
commit a9eceac6f1
2 changed files with 5 additions and 12 deletions

View file

@ -6,7 +6,7 @@
"en": "Newsletter and mailing list manager", "en": "Newsletter and mailing list manager",
"fr": "Manager de newsletter et mailing list" "fr": "Manager de newsletter et mailing list"
}, },
"version": "2.3.0~ynh1", "version": "2.3.0~ynh2",
"url": "https://listmonk.app/", "url": "https://listmonk.app/",
"upstream": { "upstream": {
"license": "AGPL-3.0-only", "license": "AGPL-3.0-only",
@ -38,14 +38,6 @@
"name": "is_public", "name": "is_public",
"type": "boolean", "type": "boolean",
"default": true "default": true
},
{
"name": "admin",
"type": "user"
},
{
"name": "password",
"type": "password"
} }
] ]
} }

View file

@ -79,6 +79,8 @@ if ! ynh_permission_exists --permission="api"; then
fi fi
if ynh_compare_current_package_version --comparison le --version 2.3.0~ynh1 if ynh_compare_current_package_version --comparison le --version 2.3.0~ynh1
mkdir -p "$final_path/uploads"
ynh_permission_delete --permission="admin" ynh_permission_delete --permission="admin"
ynh_permission_delete --permission="api" ynh_permission_delete --permission="api"
@ -102,11 +104,10 @@ ynh_system_user_create --username=$app --home_dir="$final_path"
if [ "$upgrade_type" == "UPGRADE_APP" ] 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
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
if [ $YNH_ARCH == "armhf" ] || [ $YNH_ARCH == "arm64" ] if [ $YNH_ARCH == "armhf" ] || [ $YNH_ARCH == "arm64" ]
then then
ynh_setup_source --dest_dir="$final_path/build" --keep="$final_path/config.toml" ynh_setup_source --dest_dir="$final_path/build" --keep="$final_path/config.toml uploads"
# Install Nodejs # Install Nodejs
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
# Install Yarn # Install Yarn
@ -126,7 +127,7 @@ then
ynh_remove_nodejs ynh_remove_nodejs
ynh_secure_remove --file="$final_path/build" ynh_secure_remove --file="$final_path/build"
else else
ynh_setup_source --dest_dir="$final_path" --source_id=$YNH_ARCH --keep="$final_path/config.toml" ynh_setup_source --dest_dir="$final_path" --source_id=$YNH_ARCH --keep="$final_path/config.toml uploads"
fi fi
fi fi