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

this is freaking wip let me push please

This commit is contained in:
Tagada 2020-05-18 22:23:07 +02:00
parent 1b55c4b8ec
commit 5d0f05cc50
3 changed files with 68 additions and 66 deletions

View file

@ -1,65 +1,65 @@
{ {
"name": "Glitch-Soc", "name": "Glitch-Soc",
"id": "glitchsoc", "id": "glitchsoc",
"packaging_format": 1, "packaging_format": 1,
"description": { "description": {
"en": "A libre and federated social network.", "en": "A libre and federated social network.",
"fr": "Un réseau social libre et fédéré." "fr": "Un réseau social libre et fédéré."
}, },
"version": "2020-05-14~ynh1", "version": "2020-05-14~ynh1",
"url": "https://glitch-soc.github.io/docs/", "url": "https://glitch-soc.github.io/docs/",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"maintainer": [ "maintainer": [
{ {
"name": "Tagada" "name": "Tagada"
}
],
"requirements": {
"yunohost": ">= 3.7"
},
"multi_instance": true,
"services": [
"nginx"
],
"arguments": {
"install" : [
{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain for Mastodon",
"fr": "Choisissez un domaine pour Mastodon"
},
"example": "example.com"
},
{
"name": "admin",
"type": "user",
"ask": {
"en": "Choose an admin user",
"fr": "Choisissez l'administrateur"
},
"example": "johndoe"
},
{
"name": "is_public",
"type": "boolean",
"ask": {
"en": "Is it a public application?",
"fr": "Est-ce une application publique ?"
},
"default": true
},
{
"name": "language",
"type": "string",
"ask": {
"en": "Choose the application language",
"fr": "Choisissez la langue de l'application"
},
"choices": ["en_EN", "fr_FR"],
"default": "fr_FR"
}
]
} }
],
"requirements": {
"yunohost": ">= 3.7"
},
"multi_instance": true,
"services": [
"nginx"
],
"arguments": {
"install" : [
{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain for Mastodon",
"fr": "Choisissez un domaine pour Mastodon"
},
"example": "example.com"
},
{
"name": "admin",
"type": "user",
"ask": {
"en": "Choose an admin user",
"fr": "Choisissez l'administrateur"
},
"example": "johndoe"
},
{
"name": "is_public",
"type": "boolean",
"ask": {
"en": "Is it a public application?",
"fr": "Est-ce une application publique ?"
},
"default": true
},
{
"name": "language",
"type": "string",
"ask": {
"en": "Choose the application language",
"fr": "Choisissez la langue de l'application"
},
"choices": ["en_EN", "fr_FR"],
"default": "fr_FR"
}
]
}
} }

View file

@ -81,16 +81,17 @@ ynh_app_setting_set --app=$app --key=port_stream --value=$port_stream
ynh_script_progression --message="Installing dependencies..." --weight=86 ynh_script_progression --message="Installing dependencies..." --weight=86
ynh_install_nodejs --nodejs_version="10" ynh_install_nodejs --nodejs_version="10"
ynh_install_app_dependencies $pkg_dependencies
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
# Get Redis >= 4.0 # Get Redis >= 4.0
if [ "$(lsb_release --codename --short)" = "buster" ]; then if [ "$(lsb_release --codename --short)" = "buster" ]; then
ynh_install_app_dependencies "redis-server redis-tools" ynh_add_app_dependencies "redis-server redis-tools"
else else
ynh_install_extra_app_dependencies --repo="deb http://deb.debian.org/debian stretch-backports main" --package="redis-server redis-tools" ynh_install_extra_app_dependencies --repo="deb http://deb.debian.org/debian stretch-backports main" --package="redis-server redis-tools"
end end
ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# CREATE A POSTGRESQL DATABASE # CREATE A POSTGRESQL DATABASE
#================================================= #=================================================
@ -188,6 +189,7 @@ ynh_replace_string --match_string="__OTP_SECRET__" --replace_string="$otp_secret
ynh_app_setting_set --app="$app" --key=otp_secret --value="$otp_secret" ynh_app_setting_set --app="$app" --key=otp_secret --value="$otp_secret"
ynh_replace_string --match_string="dev.glitch.social" --replace_string="$domain" --target_file="$final_path/live/config/settings.yml" ynh_replace_string --match_string="dev.glitch.social" --replace_string="$domain" --target_file="$final_path/live/config/settings.yml"
ynh_replace_string --match_string="registrations_mode: 'open'" --replace_string="registrations_mode: 'none'" --target_file="$final_path/live/config/settings.yml"
#================================================= #=================================================
# INSTALLING Glitch-Soc # INSTALLING Glitch-Soc
@ -230,7 +232,7 @@ ynh_script_progression --message="Setuping a cron job for removing cache..." --w
ynh_replace_string --match_string="__FINAL_PATH__" --replace_string="$final_path" --target_file="../conf/cron" ynh_replace_string --match_string="__FINAL_PATH__" --replace_string="$final_path" --target_file="../conf/cron"
ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="../conf/cron" ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="../conf/cron"
sudo cp -f ../conf/cron /etc/cron.d/$app cp -f ../conf/cron /etc/cron.d/$app
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD

View file

@ -312,7 +312,7 @@ ynh_script_progression --message="Setuping a cron job for removing cache..." --w
ynh_replace_string --match_string="__FINAL_PATH__" --replace_string="$final_path" --target_file="../conf/cron" ynh_replace_string --match_string="__FINAL_PATH__" --replace_string="$final_path" --target_file="../conf/cron"
ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="../conf/cron" ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="../conf/cron"
sudo cp -f ../conf/cron /etc/cron.d/$app cp -f ../conf/cron /etc/cron.d/$app
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD