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

Merge pull request #53 from YunoHost-Apps/testing

Testing
This commit is contained in:
eric_G 2024-08-14 19:06:05 +02:00 committed by GitHub
commit 566718defc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 238 additions and 59 deletions

View file

@ -5,4 +5,6 @@
- [Irakurri README euskaraz](README_eu.md) - [Irakurri README euskaraz](README_eu.md)
- [Lire le README en français](README_fr.md) - [Lire le README en français](README_fr.md)
- [Le o README en galego](README_gl.md) - [Le o README en galego](README_gl.md)
- [Baca README dalam bahasa bahasa Indonesia](README_id.md)
- [Прочитать README на русский](README_ru.md)
- [阅读中文(简体)的 README](README_zh_Hans.md) - [阅读中文(简体)的 README](README_zh_Hans.md)

View file

@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# Libreddit for YunoHost # Libreddit for YunoHost
[![Integration level](https://dash.yunohost.org/integration/libreddit.svg)](https://dash.yunohost.org/appci/app/libreddit) ![Working status](https://ci-apps.yunohost.org/ci/badges/libreddit.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/libreddit.maintain.svg) [![Integration level](https://dash.yunohost.org/integration/libreddit.svg)](https://ci-apps.yunohost.org/ci/apps/libreddit/) ![Working status](https://ci-apps.yunohost.org/ci/badges/libreddit.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/libreddit.maintain.svg)
[![Install Libreddit with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=libreddit) [![Install Libreddit with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=libreddit)
@ -26,7 +26,7 @@ Libreddit is a portmanteau of "libre" (meaning freedom) and "Reddit". It is a pr
- Strong Content Security Policy prevents browser requests to Reddit - Strong Content Security Policy prevents browser requests to Reddit
**Shipped version:** 0.30.1~ynh4 **Shipped version:** 0.35.1~ynh1
**Demo:** <https://libreddit.spike.codes/> **Demo:** <https://libreddit.spike.codes/>

View file

@ -5,7 +5,7 @@ No se debe editar a mano.
# Libreddit para Yunohost # Libreddit para Yunohost
[![Nivel de integración](https://dash.yunohost.org/integration/libreddit.svg)](https://dash.yunohost.org/appci/app/libreddit) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/libreddit.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/libreddit.maintain.svg) [![Nivel de integración](https://dash.yunohost.org/integration/libreddit.svg)](https://ci-apps.yunohost.org/ci/apps/libreddit/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/libreddit.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/libreddit.maintain.svg)
[![Instalar Libreddit con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=libreddit) [![Instalar Libreddit con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=libreddit)
@ -26,7 +26,7 @@ Libreddit is a portmanteau of "libre" (meaning freedom) and "Reddit". It is a pr
- Strong Content Security Policy prevents browser requests to Reddit - Strong Content Security Policy prevents browser requests to Reddit
**Versión actual:** 0.30.1~ynh4 **Versión actual:** 0.35.1~ynh1
**Demo:** <https://libreddit.spike.codes/> **Demo:** <https://libreddit.spike.codes/>

View file

@ -5,7 +5,7 @@ EZ editatu eskuz.
# Libreddit YunoHost-erako # Libreddit YunoHost-erako
[![Integrazio maila](https://dash.yunohost.org/integration/libreddit.svg)](https://dash.yunohost.org/appci/app/libreddit) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/libreddit.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/libreddit.maintain.svg) [![Integrazio maila](https://dash.yunohost.org/integration/libreddit.svg)](https://ci-apps.yunohost.org/ci/apps/libreddit/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/libreddit.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/libreddit.maintain.svg)
[![Instalatu Libreddit YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=libreddit) [![Instalatu Libreddit YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=libreddit)
@ -26,7 +26,7 @@ Libreddit is a portmanteau of "libre" (meaning freedom) and "Reddit". It is a pr
- Strong Content Security Policy prevents browser requests to Reddit - Strong Content Security Policy prevents browser requests to Reddit
**Paketatutako bertsioa:** 0.30.1~ynh4 **Paketatutako bertsioa:** 0.35.1~ynh1
**Demoa:** <https://libreddit.spike.codes/> **Demoa:** <https://libreddit.spike.codes/>

View file

@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main.
# Libreddit pour YunoHost # Libreddit pour YunoHost
[![Niveau dintégration](https://dash.yunohost.org/integration/libreddit.svg)](https://dash.yunohost.org/appci/app/libreddit) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/libreddit.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/libreddit.maintain.svg) [![Niveau dintégration](https://dash.yunohost.org/integration/libreddit.svg)](https://ci-apps.yunohost.org/ci/apps/libreddit/) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/libreddit.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/libreddit.maintain.svg)
[![Installer Libreddit avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=libreddit) [![Installer Libreddit avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=libreddit)
@ -25,7 +25,7 @@ Libreddit est un mot-valise de "libre" (qui signifie liberté) et "Reddit". C'es
- Toutes les requêtes sont transmises via le serveur, y compris les médias - Toutes les requêtes sont transmises via le serveur, y compris les médias
- Une politique de sécurité du contenu solide empêche les requêtes du navigateur à Reddit - Une politique de sécurité du contenu solide empêche les requêtes du navigateur à Reddit
**Version incluse:** 0.30.1~ynh4 **Version incluse:** 0.35.1~ynh1
**Démo:** <https://libreddit.spike.codes/> **Démo:** <https://libreddit.spike.codes/>

View file

@ -5,7 +5,7 @@ NON debe editarse manualmente.
# Libreddit para YunoHost # Libreddit para YunoHost
[![Nivel de integración](https://dash.yunohost.org/integration/libreddit.svg)](https://dash.yunohost.org/appci/app/libreddit) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/libreddit.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/libreddit.maintain.svg) [![Nivel de integración](https://dash.yunohost.org/integration/libreddit.svg)](https://ci-apps.yunohost.org/ci/apps/libreddit/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/libreddit.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/libreddit.maintain.svg)
[![Instalar Libreddit con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=libreddit) [![Instalar Libreddit con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=libreddit)
@ -26,7 +26,7 @@ Libreddit is a portmanteau of "libre" (meaning freedom) and "Reddit". It is a pr
- Strong Content Security Policy prevents browser requests to Reddit - Strong Content Security Policy prevents browser requests to Reddit
**Versión proporcionada:** 0.30.1~ynh4 **Versión proporcionada:** 0.35.1~ynh1
**Demo:** <https://libreddit.spike.codes/> **Demo:** <https://libreddit.spike.codes/>

56
README_id.md Normal file
View file

@ -0,0 +1,56 @@
<!--
N.B.: README ini dibuat secara otomatis oleh <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
Ini TIDAK boleh diedit dengan tangan.
-->
# Libreddit untuk YunoHost
[![Tingkat integrasi](https://dash.yunohost.org/integration/libreddit.svg)](https://ci-apps.yunohost.org/ci/apps/libreddit/) ![Status kerja](https://ci-apps.yunohost.org/ci/badges/libreddit.status.svg) ![Status pemeliharaan](https://ci-apps.yunohost.org/ci/badges/libreddit.maintain.svg)
[![Pasang Libreddit dengan YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=libreddit)
*[Baca README ini dengan bahasa yang lain.](./ALL_README.md)*
> *Paket ini memperbolehkan Anda untuk memasang Libreddit secara cepat dan mudah pada server YunoHost.*
> *Bila Anda tidak mempunyai YunoHost, silakan berkonsultasi dengan [panduan](https://yunohost.org/install) untuk mempelajari bagaimana untuk memasangnya.*
## Ringkasan
Libreddit is a portmanteau of "libre" (meaning freedom) and "Reddit". It is a private front-end like Invidious but for Reddit. Browse the coldest takes of r/unpopularopinion without being tracked.
### Features
- Written in Rust for blazing fast speeds and memory safety
- No JavaScript, no ads, no tracking, no bloat
- All requests are proxied through the server, including media
- Strong Content Security Policy prevents browser requests to Reddit
**Versi terkirim:** 0.35.1~ynh1
**Demo:** <https://libreddit.spike.codes/>
## Tangkapan Layar
![Tangkapan Layar pada Libreddit](./doc/screenshots/screenshot.png)
## Dokumentasi dan sumber daya
- Website aplikasi resmi: <https://libreddit.spike.codes/>
- Depot kode aplikasi hulu: <https://github.com/spikecodes/libreddit>
- Gudang YunoHost: <https://apps.yunohost.org/app/libreddit>
- Laporkan bug: <https://github.com/YunoHost-Apps/libreddit_ynh/issues>
## Info developer
Silakan kirim pull request ke [`testing` branch](https://github.com/YunoHost-Apps/libreddit_ynh/tree/testing).
Untuk mencoba branch `testing`, silakan dilanjutkan seperti:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/libreddit_ynh/tree/testing --debug
atau
sudo yunohost app upgrade libreddit -u https://github.com/YunoHost-Apps/libreddit_ynh/tree/testing --debug
```
**Info lebih lanjut mengenai pemaketan aplikasi:** <https://yunohost.org/packaging_apps>

56
README_ru.md Normal file
View file

@ -0,0 +1,56 @@
<!--
Важно: этот README был автоматически сгенерирован <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
Он НЕ ДОЛЖЕН редактироваться вручную.
-->
# Libreddit для YunoHost
[![Уровень интеграции](https://dash.yunohost.org/integration/libreddit.svg)](https://ci-apps.yunohost.org/ci/apps/libreddit/) ![Состояние работы](https://ci-apps.yunohost.org/ci/badges/libreddit.status.svg) ![Состояние сопровождения](https://ci-apps.yunohost.org/ci/badges/libreddit.maintain.svg)
[![Установите Libreddit с YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=libreddit)
*[Прочтите этот README на других языках.](./ALL_README.md)*
> *Этот пакет позволяет Вам установить Libreddit быстро и просто на YunoHost-сервер.*
> *Если у Вас нет YunoHost, пожалуйста, посмотрите [инструкцию](https://yunohost.org/install), чтобы узнать, как установить его.*
## Обзор
Libreddit is a portmanteau of "libre" (meaning freedom) and "Reddit". It is a private front-end like Invidious but for Reddit. Browse the coldest takes of r/unpopularopinion without being tracked.
### Features
- Written in Rust for blazing fast speeds and memory safety
- No JavaScript, no ads, no tracking, no bloat
- All requests are proxied through the server, including media
- Strong Content Security Policy prevents browser requests to Reddit
**Поставляемая версия:** 0.35.1~ynh1
**Демо-версия:** <https://libreddit.spike.codes/>
## Снимки экрана
![Снимок экрана Libreddit](./doc/screenshots/screenshot.png)
## Документация и ресурсы
- Официальный веб-сайт приложения: <https://libreddit.spike.codes/>
- Репозиторий кода главной ветки приложения: <https://github.com/spikecodes/libreddit>
- Магазин YunoHost: <https://apps.yunohost.org/app/libreddit>
- Сообщите об ошибке: <https://github.com/YunoHost-Apps/libreddit_ynh/issues>
## Информация для разработчиков
Пришлите Ваш запрос на слияние в [ветку `testing`](https://github.com/YunoHost-Apps/libreddit_ynh/tree/testing).
Чтобы попробовать ветку `testing`, пожалуйста, сделайте что-то вроде этого:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/libreddit_ynh/tree/testing --debug
или
sudo yunohost app upgrade libreddit -u https://github.com/YunoHost-Apps/libreddit_ynh/tree/testing --debug
```
**Больше информации о пакетировании приложений:** <https://yunohost.org/packaging_apps>

View file

@ -5,7 +5,7 @@
# YunoHost 上的 Libreddit # YunoHost 上的 Libreddit
[![集成程度](https://dash.yunohost.org/integration/libreddit.svg)](https://dash.yunohost.org/appci/app/libreddit) ![工作状态](https://ci-apps.yunohost.org/ci/badges/libreddit.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/libreddit.maintain.svg) [![集成程度](https://dash.yunohost.org/integration/libreddit.svg)](https://ci-apps.yunohost.org/ci/apps/libreddit/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/libreddit.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/libreddit.maintain.svg)
[![使用 YunoHost 安装 Libreddit](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=libreddit) [![使用 YunoHost 安装 Libreddit](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=libreddit)
@ -26,7 +26,7 @@ Libreddit is a portmanteau of "libre" (meaning freedom) and "Reddit". It is a pr
- Strong Content Security Policy prevents browser requests to Reddit - Strong Content Security Policy prevents browser requests to Reddit
**分发版本:** 0.30.1~ynh4 **分发版本:** 0.35.1~ynh1
**演示:** <https://libreddit.spike.codes/> **演示:** <https://libreddit.spike.codes/>

52
conf/.env Normal file
View file

@ -0,0 +1,52 @@
# Redlib configuration
# See the Configuration section of the README for a more detailed explanation of these settings.
# Instance-specific settings
# Enable SFW-only mode for the instance
REDLIB_SFW_ONLY=off
# Set a banner message for the instance
REDLIB_BANNER=
# Disable search engine indexing
REDLIB_ROBOTS_DISABLE_INDEXING=off
# Set the Pushshift frontend for "removed" links
REDLIB_PUSHSHIFT_FRONTEND=undelete.pullpush.io
# Default user settings
# Set the default theme (options: system, light, dark, black, dracula, nord, laserwave, violet, gold, rosebox, gruvboxdark, gruvboxlight)
REDLIB_DEFAULT_THEME=system
# Set the default front page (options: default, popular, all)
REDLIB_DEFAULT_FRONT_PAGE=default
# Set the default layout (options: card, clean, compact)
REDLIB_DEFAULT_LAYOUT=card
# Enable wide mode by default
REDLIB_DEFAULT_WIDE=off
# Set the default post sort method (options: hot, new, top, rising, controversial)
REDLIB_DEFAULT_POST_SORT=hot
# Set the default comment sort method (options: confidence, top, new, controversial, old)
REDLIB_DEFAULT_COMMENT_SORT=confidence
# Enable blurring Spoiler content by default
REDLIB_DEFAULT_BLUR_SPOILER=off
# Enable showing NSFW content by default
REDLIB_DEFAULT_SHOW_NSFW=off
# Enable blurring NSFW content by default
REDLIB_DEFAULT_BLUR_NSFW=off
# Enable HLS video format by default
REDLIB_DEFAULT_USE_HLS=off
# Hide HLS notification by default
REDLIB_DEFAULT_HIDE_HLS_NOTIFICATION=off
# Disable autoplay videos by default
REDLIB_DEFAULT_AUTOPLAY_VIDEOS=off
# Define a default list of subreddit subscriptions (format: sub1+sub2+sub3)
REDLIB_DEFAULT_SUBSCRIPTIONS=
# Define a default list of subreddit filters (format: sub1+sub2+sub3)
REDLIB_DEFAULT_FILTERS=
# Hide awards by default
REDLIB_DEFAULT_HIDE_AWARDS=off
# Hide sidebar and summary
REDLIB_DEFAULT_HIDE_SIDEBAR_AND_SUMMARY=off
# Disable the confirmation before visiting Reddit
REDLIB_DEFAULT_DISABLE_VISIT_REDDIT_CONFIRMATION=off
# Hide score by default
REDLIB_DEFAULT_HIDE_SCORE=off
# Enable fixed navbar by default
REDLIB_DEFAULT_FIXED_NAVBAR=on

View file

@ -1,12 +0,0 @@
LIBREDDIT_DEFAULT_THEME=system
LIBREDDIT_DEFAULT_FRONT_PAGE=default
LIBREDDIT_DEFAULT_LAYOUT=card
LIBREDDIT_DEFAULT_WIDE=off
LIBREDDIT_DEFAULT_COMMENT_SORT=hot
LIBREDDIT_DEFAULT_POST_SORT=confidence
LIBREDDIT_DEFAULT_SHOW_NSFW=off
LIBREDDIT_DEFAULT_USE_HLS=on
LIBREDDIT_DEFAULT_HIDE_HLS_NOTIFICATION=off
LIBREDDIT_DEFAULT_AUTOPLAY_VIDEOS=off
LIBREDDIT_DEFAULT_SHOW_NSFW=on
LIBREDDIT_DEFAULT_DISABLE_VISIT_REDDIT_CONFIRMATION=on

17
conf/redlib.conf Normal file
View file

@ -0,0 +1,17 @@
ADDRESS=127.0.0.1
PORT=__PORT__
#REDLIB_DEFAULT_THEME=default
#REDLIB_DEFAULT_FRONT_PAGE=default
#REDLIB_DEFAULT_LAYOUT=card
#REDLIB_DEFAULT_WIDE=off
#REDLIB_DEFAULT_POST_SORT=hot
#REDLIB_DEFAULT_COMMENT_SORT=confidence
#REDLIB_DEFAULT_BLUR_SPOILER=off
#REDLIB_DEFAULT_SHOW_NSFW=off
#REDLIB_DEFAULT_BLUR_NSFW=off
#REDLIB_DEFAULT_USE_HLS=off
#REDLIB_DEFAULT_HIDE_HLS_NOTIFICATION=off
#REDLIB_DEFAULT_AUTOPLAY_VIDEOS=off
#REDLIB_DEFAULT_SUBSCRIPTIONS=off (sub1+sub2+sub3)
#REDLIB_DEFAULT_HIDE_AWARDS=off
#REDLIB_DEFAULT_DISABLE_VISIT_REDDIT_CONFIRMATION=off

View file

@ -7,8 +7,31 @@ After=network.service
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
DynamicUser=yes DynamicUser=yes
EnvironmentFile=-__INSTALL_DIR__/libreddit.conf EnvironmentFile=-__INSTALL_DIR__/redlib.conf
ExecStart=__INSTALL_DIR__/libreddit -a 127.0.0.1 -p __PORT__ #ExecStart=__INSTALL_DIR__/redlib -a 127.0.0.1 -p __PORT__ --env-file .env
ExecStart=__INSTALL_DIR__/redlib -a 127.0.0.1 -p __PORT__
# Hardening
DeviceAllow=
LockPersonality=yes
MemoryDenyWriteExecute=yes
PrivateDevices=yes
ProcSubset=pid
ProtectClock=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectProc=invisible
RestrictAddressFamilies=AF_INET AF_INET6
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service ~@privileged ~@resources
UMask=0077
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -5,7 +5,7 @@ name = "Libreddit"
description.en = "Libre alternative to Reddit" description.en = "Libre alternative to Reddit"
description.fr = "Alternative libre à Reddit" description.fr = "Alternative libre à Reddit"
version = "0.30.1~ynh4" version = "0.35.1~ynh1"
maintainers = [] maintainers = []
@ -16,11 +16,11 @@ demo = "https://libreddit.spike.codes/"
code = "https://github.com/spikecodes/libreddit" code = "https://github.com/spikecodes/libreddit"
[integration] [integration]
yunohost = ">= 11.2" yunohost = ">= 11.2.27"
architectures = ["amd64"] architectures = ["amd64"]
multi_instance = true multi_instance = true
ldap = false ldap = false
sso = "not_relevant" sso = false
disk = "50M" disk = "50M"
ram.build = "50M" ram.build = "50M"
ram.runtime = "50M" ram.runtime = "50M"
@ -37,11 +37,11 @@ ram.runtime = "50M"
[resources.sources] [resources.sources]
[resources.sources.main] [resources.sources.main]
url = "https://github.com/spikecodes/libreddit/releases/download/v0.30.0/libreddit" url = "https://github.com/redlib-org/redlib/releases/download/v0.35.1/redlib"
sha256 = "7148815a160acf4b19d5fec1e3c47f9fc7a850a212f3b83ed88a1a76c39882c9" sha256 = "795222c0a368d893310996186527372aedf280a343cf699b3d2cc753c5991131"
extract = false extract = false
in_subdir = false in_subdir = false
rename = "libreddit" rename = "redlib"
autoupdate.strategy = "latest_github_tag" autoupdate.strategy = "latest_github_tag"
[resources.system_user] [resources.system_user]

View file

@ -27,10 +27,6 @@ ynh_backup --src_path="$install_dir"
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP SYSTEMD
#=================================================
ynh_backup --src_path="/etc/systemd/system/$app.service" ynh_backup --src_path="/etc/systemd/system/$app.service"
#================================================= #=================================================

View file

@ -18,7 +18,7 @@ ynh_script_progression --message="Setting up source files..." --weight=1
ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
chmod +x $install_dir/libreddit chmod +x $install_dir/redlib
#================================================= #=================================================
# SYSTEM CONFIGURATION # SYSTEM CONFIGURATION
@ -38,10 +38,10 @@ yunohost service add $app --description="Alternative to Reddit" --log="/var/log/
#================================================= #=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="../conf/libreddit.conf" --destination="$install_dir/libreddit.conf" ynh_add_config --template="redlib.conf" --destination="$install_dir/redlib.conf"
chmod 400 "$install_dir/libreddit.conf" chmod 400 "$install_dir/redlib.conf"
chown $app:$app "$install_dir/libreddit.conf" chown $app:$app "$install_dir/redlib.conf"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE

View file

@ -6,7 +6,6 @@
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers

View file

@ -9,12 +9,6 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# STANDARD UPGRADE STEPS # STANDARD UPGRADE STEPS
#================================================= #=================================================
@ -27,17 +21,13 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Upgrading source files..." --weight=5
if [ "$upgrade_type" == "UPGRADE_APP" ] # Download, check integrity, uncompress and patch the source from app.src
then ynh_setup_source --dest_dir="$install_dir" --keep="redlib.conf" --full_replace=1
ynh_script_progression --message="Upgrading source files..." --weight=5
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep="libreddit.conf"
fi
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
chmod +x $install_dir/libreddit chmod +x $install_dir/redlib
#================================================= #=================================================
# REAPPLY SYSTEM CONFIGURATIONS # REAPPLY SYSTEM CONFIGURATIONS
@ -55,12 +45,12 @@ yunohost service add $app --description="Alternative to Reddit" --log="/var/log/
#================================================= #=================================================
# UPDATE A CONFIG FILE # UPDATE A CONFIG FILE
#================================================= #=================================================
#ynh_script_progression --message="Updating a configuration file..." --weight=1 ynh_script_progression --message="Updating a configuration file..." --weight=1
# ynh_add_config --template="../conf/libreddit.conf" --destination="$install_dir/libreddit.conf" ynh_add_config --template="redlib.conf" --destination="$install_dir/redlib.conf"
# chmod 400 "$install_dir/libreddit.conf" chmod 400 "$install_dir/redlib.conf"
# chown $app:$app "$install_dir/libreddit.conf" chown $app:$app "$install_dir/redlib.conf"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE