mirror of
https://github.com/YunoHost-Apps/writefreely_ynh.git
synced 2024-09-03 20:36:02 +02:00
Merge pull request #32 from YunoHost-Apps/remove_parameters
Remove parameters
This commit is contained in:
commit
89c4e9e5d1
5 changed files with 29 additions and 121 deletions
|
@ -7,18 +7,9 @@
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld" (DOMAIN)
|
||||||
admin="john" (USER)
|
admin="john" (USER)
|
||||||
|
|
||||||
is_public=1 (PUBLIC|public=1|private=0)
|
is_public=1 (PUBLIC|public=1|private=0)
|
||||||
password="pass"
|
password="pass"
|
||||||
single_user="true"
|
single_user=1
|
||||||
site_name="WriteFreely"
|
|
||||||
site_description="WriteFreely Blogs"
|
|
||||||
open_registration="true"
|
|
||||||
max_blogs="1"
|
|
||||||
federation="true"
|
|
||||||
public_stats="true"
|
|
||||||
private="false"
|
|
||||||
local_timeline="true"
|
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
setup_sub_dir=0
|
setup_sub_dir=0
|
||||||
|
|
|
@ -4,6 +4,10 @@ port = __PORT__
|
||||||
bind = localhost
|
bind = localhost
|
||||||
tls_cert_path =
|
tls_cert_path =
|
||||||
tls_key_path =
|
tls_key_path =
|
||||||
|
templates_parent_dir =
|
||||||
|
static_parent_dir =
|
||||||
|
pages_parent_dir =
|
||||||
|
keys_parent_dir =
|
||||||
|
|
||||||
[database]
|
[database]
|
||||||
type = mysql
|
type = mysql
|
||||||
|
@ -15,18 +19,18 @@ host = localhost
|
||||||
port = 3306
|
port = 3306
|
||||||
|
|
||||||
[app]
|
[app]
|
||||||
site_name = __SITENAME__
|
site_name = WriteFreely
|
||||||
site_description = __SITEDESCRIPTION__
|
site_description = WriteFreely_Blogs
|
||||||
host = __DOMAIN_URL__
|
host = __DOMAIN_URL__
|
||||||
theme = write
|
theme = write
|
||||||
disable_js = false
|
disable_js = false
|
||||||
webfonts = true
|
webfonts = true
|
||||||
single_user = __SINGLEUSER__
|
single_user = __SINGLEUSER__
|
||||||
open_registration = __OPENREGISTRATION__
|
open_registration = true
|
||||||
min_username_len = 3
|
min_username_len = 3
|
||||||
max_blogs = __MAXBLOGS__
|
max_blogs = 4
|
||||||
federation = __FEDERATION__
|
federation = true
|
||||||
public_stats = __PUBLICSTATS__
|
public_stats = true
|
||||||
private = __PRIVATE__
|
private = false
|
||||||
local_timeline = __LOCALTIMELINE__
|
local_timeline = true
|
||||||
|
user_invites =
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "For starting a minimalist, federated blog — or an entire community.",
|
"en": "For starting a minimalist, federated blog — or an entire community.",
|
||||||
"fr": "Permet de créer un blog fédéré minimaliste ou une communauté entière."
|
"fr": "Permet de créer un blog fédéré minimaliste ou une communauté entière."
|
||||||
},
|
},
|
||||||
"version": "0.8.1~ynh3",
|
"version": "0.8.1~ynh4",
|
||||||
"url": "https://writefreely.org",
|
"url": "https://writefreely.org",
|
||||||
"license": "free",
|
"license": "free",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
@ -71,78 +71,6 @@
|
||||||
"fr": "Souhaitez vous un blog pour un seul utilisateur?"
|
"fr": "Souhaitez vous un blog pour un seul utilisateur?"
|
||||||
},
|
},
|
||||||
"default": true
|
"default": true
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "site_name",
|
|
||||||
"type": "string",
|
|
||||||
"ask": {
|
|
||||||
"en": "Choose a name for your WriteFreely instance",
|
|
||||||
"fr": "Choisissez un nom pour votre instance WriteFreely"
|
|
||||||
},
|
|
||||||
"default": "WriteFreely"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "site_description",
|
|
||||||
"type": "string",
|
|
||||||
"ask": {
|
|
||||||
"en": "Choose a description for your WriteFreely instance",
|
|
||||||
"fr": "Choisissez une description pour votre instance WriteFreely"
|
|
||||||
},
|
|
||||||
"default": "WriteFreely_Blogs"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "open_registration",
|
|
||||||
"type": "boolean",
|
|
||||||
"ask": {
|
|
||||||
"en": "Are registrations opened to all ?",
|
|
||||||
"fr": "Les inscriptions sont t'elles ouvertes ?"
|
|
||||||
},
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "max_blogs",
|
|
||||||
"type": "string",
|
|
||||||
"ask": {
|
|
||||||
"en": "How many blogs each user can create ?",
|
|
||||||
"fr": "Combien de blogs chaque utilisateur peut créer ?"
|
|
||||||
},
|
|
||||||
"default": "3"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "federation",
|
|
||||||
"type": "boolean",
|
|
||||||
"ask": {
|
|
||||||
"en": "Is it federation enabled ?",
|
|
||||||
"fr": "Est-ce une application publique ?"
|
|
||||||
},
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "public_stats",
|
|
||||||
"type": "boolean",
|
|
||||||
"ask": {
|
|
||||||
"en": "Are federation stats public ?",
|
|
||||||
"fr": "Est-ce les statistiques de federation sont publiques ?"
|
|
||||||
},
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "private",
|
|
||||||
"type": "boolean",
|
|
||||||
"ask": {
|
|
||||||
"en": "Are the instance metadata private ?",
|
|
||||||
"fr": "Est-ce les metadatas de l'instance sont privée ?"
|
|
||||||
},
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "local_timeline",
|
|
||||||
"type": "boolean",
|
|
||||||
"ask": {
|
|
||||||
"en": "Do you want to add a local timeline ?",
|
|
||||||
"fr": "Voulez vous afficher une timeline locale ?"
|
|
||||||
},
|
|
||||||
"default": false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,14 +43,6 @@ is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
#language=$YNH_APP_ARG_LANGUAGE
|
#language=$YNH_APP_ARG_LANGUAGE
|
||||||
password=$YNH_APP_ARG_PASSWORD
|
password=$YNH_APP_ARG_PASSWORD
|
||||||
single_user=$YNH_APP_ARG_SINGLE_USER
|
single_user=$YNH_APP_ARG_SINGLE_USER
|
||||||
site_name=$YNH_APP_ARG_SITE_NAME
|
|
||||||
site_description=$YNH_APP_ARG_SITE_DESCRIPTION
|
|
||||||
open_registration=$YNH_APP_ARG_OPEN_REGISTRATION
|
|
||||||
max_blogs=$YNH_APP_ARG_MAX_BLOGS
|
|
||||||
federation=$YNH_APP_ARG_FEDERATION
|
|
||||||
public_stats=$YNH_APP_ARG_PUBLIC_STATS
|
|
||||||
private=$YNH_APP_ARG_PRIVATE
|
|
||||||
local_timeline=$YNH_APP_ARG_LOCAL_TIMELINE
|
|
||||||
|
|
||||||
## Bypass package_checker name not compatible with writefreely
|
## Bypass package_checker name not compatible with writefreely
|
||||||
if [ "$admin" = "package_checker" ]
|
if [ "$admin" = "package_checker" ]
|
||||||
|
@ -97,14 +89,6 @@ ynh_app_setting_set $app admin $admin
|
||||||
ynh_app_setting_set $app is_public $is_public
|
ynh_app_setting_set $app is_public $is_public
|
||||||
#ynh_app_setting_set $app language $language
|
#ynh_app_setting_set $app language $language
|
||||||
ynh_app_setting_set $app single_user $single_user
|
ynh_app_setting_set $app single_user $single_user
|
||||||
ynh_app_setting_set $app site_name $site_name
|
|
||||||
ynh_app_setting_set $app site_description $site_description
|
|
||||||
ynh_app_setting_set $app open_registration $open_registration
|
|
||||||
ynh_app_setting_set $app max_blogs $max_blogs
|
|
||||||
ynh_app_setting_set $app federation $federation
|
|
||||||
ynh_app_setting_set $app public_stats $public_stats
|
|
||||||
ynh_app_setting_set $app private $private
|
|
||||||
ynh_app_setting_set $app local_timeline $local_timeline
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
|
@ -277,14 +261,6 @@ ynh_replace_string "__DBPWD__" "$db_pwd" "$final_path/config.ini"
|
||||||
ynh_replace_string "__PORT__" "$port" "$final_path/config.ini"
|
ynh_replace_string "__PORT__" "$port" "$final_path/config.ini"
|
||||||
ynh_replace_string "__DOMAIN_URL__" "https://$domain$path_url" "$final_path/config.ini"
|
ynh_replace_string "__DOMAIN_URL__" "https://$domain$path_url" "$final_path/config.ini"
|
||||||
ynh_replace_string "__SINGLEUSER__" "$single_user" "$final_path/config.ini"
|
ynh_replace_string "__SINGLEUSER__" "$single_user" "$final_path/config.ini"
|
||||||
ynh_replace_string "__SITENAME__" "$site_name" "$final_path/config.ini"
|
|
||||||
ynh_replace_string "__SITEDESCRIPTION__" "$site_description" "$final_path/config.ini"
|
|
||||||
ynh_replace_string "__OPENREGISTRATION__" "$open_registration" "$final_path/config.ini"
|
|
||||||
ynh_replace_string "__MAXBLOGS__" "$max_blogs" "$final_path/config.ini"
|
|
||||||
ynh_replace_string "__FEDERATION__" "$federation" "$final_path/config.ini"
|
|
||||||
ynh_replace_string "__PUBLICSTATS__" "$public_stats" "$final_path/config.ini"
|
|
||||||
ynh_replace_string "__PRIVATE__" "$private" "$final_path/config.ini"
|
|
||||||
ynh_replace_string "__LOCALTIMELINE__" "$local_timeline" "$final_path/config.ini"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE THE CONFIG FILE CHECKSUM
|
# STORE THE CONFIG FILE CHECKSUM
|
||||||
|
|
|
@ -36,6 +36,15 @@ final_path=$(ynh_app_setting_get $app final_path)
|
||||||
db_name=$(ynh_app_setting_get $app db_name)
|
db_name=$(ynh_app_setting_get $app db_name)
|
||||||
port=$(ynh_app_setting_get $app port)
|
port=$(ynh_app_setting_get $app port)
|
||||||
|
|
||||||
|
ynh_app_setting_delete $app site_name
|
||||||
|
ynh_app_setting_delete $app site_description
|
||||||
|
ynh_app_setting_delete $app open_registration
|
||||||
|
ynh_app_setting_delete $app max_blogs
|
||||||
|
ynh_app_setting_delete $app federation
|
||||||
|
ynh_app_setting_delete $app public_stats
|
||||||
|
ynh_app_setting_delete $app private
|
||||||
|
ynh_app_setting_delete $app local_timeline
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue