mirror of
https://github.com/YunoHost-Apps/shiori_ynh.git
synced 2024-09-03 20:26:17 +02:00
commit
fb13f3f2e5
19 changed files with 181 additions and 150 deletions
|
@ -5,4 +5,6 @@
|
|||
- [Irakurri README euskaraz](README_eu.md)
|
||||
- [Lire le README en français](README_fr.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)
|
||||
|
|
|
@ -28,7 +28,7 @@ Shiori is a simple bookmarks manager written in Go language. Intended as a simpl
|
|||
- Where possible, by default shiori will download a static copy of the webpage in simple text and HTML format, which later can be used as an offline archive for that page.
|
||||
|
||||
|
||||
**Shipped version:** 1.7.0~ynh2
|
||||
**Shipped version:** 1.7.0~ynh3
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ Shiori is a simple bookmarks manager written in Go language. Intended as a simpl
|
|||
- Where possible, by default shiori will download a static copy of the webpage in simple text and HTML format, which later can be used as an offline archive for that page.
|
||||
|
||||
|
||||
**Versión actual:** 1.7.0~ynh2
|
||||
**Versión actual:** 1.7.0~ynh3
|
||||
|
||||
## Capturas
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ Shiori is a simple bookmarks manager written in Go language. Intended as a simpl
|
|||
- Where possible, by default shiori will download a static copy of the webpage in simple text and HTML format, which later can be used as an offline archive for that page.
|
||||
|
||||
|
||||
**Paketatutako bertsioa:** 1.7.0~ynh2
|
||||
**Paketatutako bertsioa:** 1.7.0~ynh3
|
||||
|
||||
## Pantaila-argazkiak
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ Shiori est un simple gestionnaire de signets écrit en langage Go. Conçu comme
|
|||
- Dans la mesure du possible, shiori téléchargera par défaut une copie statique de la page Web au format texte simple et HTML, qui pourra ensuite être utilisée comme archive hors ligne pour cette page.
|
||||
|
||||
|
||||
**Version incluse :** 1.7.0~ynh2
|
||||
**Version incluse :** 1.7.0~ynh3
|
||||
|
||||
## Captures d’écran
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ Shiori is a simple bookmarks manager written in Go language. Intended as a simpl
|
|||
- Where possible, by default shiori will download a static copy of the webpage in simple text and HTML format, which later can be used as an offline archive for that page.
|
||||
|
||||
|
||||
**Versión proporcionada:** 1.7.0~ynh2
|
||||
**Versión proporcionada:** 1.7.0~ynh3
|
||||
|
||||
## Capturas de pantalla
|
||||
|
||||
|
|
57
README_id.md
Normal file
57
README_id.md
Normal file
|
@ -0,0 +1,57 @@
|
|||
<!--
|
||||
N.B.: README ini dibuat secara otomatis oleh <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
|
||||
Ini TIDAK boleh diedit dengan tangan.
|
||||
-->
|
||||
|
||||
# Shiori untuk YunoHost
|
||||
|
||||
[![Tingkat integrasi](https://dash.yunohost.org/integration/shiori.svg)](https://ci-apps.yunohost.org/ci/apps/shiori/) ![Status kerja](https://ci-apps.yunohost.org/ci/badges/shiori.status.svg) ![Status pemeliharaan](https://ci-apps.yunohost.org/ci/badges/shiori.maintain.svg)
|
||||
|
||||
[![Pasang Shiori dengan YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=shiori)
|
||||
|
||||
*[Baca README ini dengan bahasa yang lain.](./ALL_README.md)*
|
||||
|
||||
> *Paket ini memperbolehkan Anda untuk memasang Shiori 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
|
||||
|
||||
Shiori is a simple bookmarks manager written in Go language. Intended as a simple clone of Pocket. You can use it as command line application or as web application. This application is distributed as a single binary, which means it can be installed and used easily.
|
||||
|
||||
### Features
|
||||
|
||||
- Simple and clean command line interface.
|
||||
- Basic bookmarks management i.e. add, edit and delete.
|
||||
- Search bookmarks by their title, tags, URL and page content.
|
||||
- Import and export bookmarks from and to Netscape Bookmark file.
|
||||
- Simple web interface for those who don't want to use a command line app.
|
||||
- Where possible, by default shiori will download a static copy of the webpage in simple text and HTML format, which later can be used as an offline archive for that page.
|
||||
|
||||
|
||||
**Versi terkirim:** 1.7.0~ynh3
|
||||
|
||||
## Tangkapan Layar
|
||||
|
||||
![Tangkapan Layar pada Shiori](./doc/screenshots/screenshot.png)
|
||||
|
||||
## Dokumentasi dan sumber daya
|
||||
|
||||
- Dokumentasi pengguna resmi: <https://github.com/go-shiori/shiori/wiki/Usage>
|
||||
- Dokumentasi admin resmi: <https://github.com/go-shiori/shiori/wiki>
|
||||
- Depot kode aplikasi hulu: <https://github.com/go-shiori/shiori>
|
||||
- Gudang YunoHost: <https://apps.yunohost.org/app/shiori>
|
||||
- Laporkan bug: <https://github.com/YunoHost-Apps/shiori_ynh/issues>
|
||||
|
||||
## Info developer
|
||||
|
||||
Silakan kirim pull request ke [`testing` branch](https://github.com/YunoHost-Apps/shiori_ynh/tree/testing).
|
||||
|
||||
Untuk mencoba branch `testing`, silakan dilanjutkan seperti:
|
||||
|
||||
```bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/shiori_ynh/tree/testing --debug
|
||||
atau
|
||||
sudo yunohost app upgrade shiori -u https://github.com/YunoHost-Apps/shiori_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Info lebih lanjut mengenai pemaketan aplikasi:** <https://yunohost.org/packaging_apps>
|
57
README_ru.md
Normal file
57
README_ru.md
Normal file
|
@ -0,0 +1,57 @@
|
|||
<!--
|
||||
Важно: этот README был автоматически сгенерирован <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
|
||||
Он НЕ ДОЛЖЕН редактироваться вручную.
|
||||
-->
|
||||
|
||||
# Shiori для YunoHost
|
||||
|
||||
[![Уровень интеграции](https://dash.yunohost.org/integration/shiori.svg)](https://ci-apps.yunohost.org/ci/apps/shiori/) ![Состояние работы](https://ci-apps.yunohost.org/ci/badges/shiori.status.svg) ![Состояние сопровождения](https://ci-apps.yunohost.org/ci/badges/shiori.maintain.svg)
|
||||
|
||||
[![Установите Shiori с YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=shiori)
|
||||
|
||||
*[Прочтите этот README на других языках.](./ALL_README.md)*
|
||||
|
||||
> *Этот пакет позволяет Вам установить Shiori быстро и просто на YunoHost-сервер.*
|
||||
> *Если у Вас нет YunoHost, пожалуйста, посмотрите [инструкцию](https://yunohost.org/install), чтобы узнать, как установить его.*
|
||||
|
||||
## Обзор
|
||||
|
||||
Shiori is a simple bookmarks manager written in Go language. Intended as a simple clone of Pocket. You can use it as command line application or as web application. This application is distributed as a single binary, which means it can be installed and used easily.
|
||||
|
||||
### Features
|
||||
|
||||
- Simple and clean command line interface.
|
||||
- Basic bookmarks management i.e. add, edit and delete.
|
||||
- Search bookmarks by their title, tags, URL and page content.
|
||||
- Import and export bookmarks from and to Netscape Bookmark file.
|
||||
- Simple web interface for those who don't want to use a command line app.
|
||||
- Where possible, by default shiori will download a static copy of the webpage in simple text and HTML format, which later can be used as an offline archive for that page.
|
||||
|
||||
|
||||
**Поставляемая версия:** 1.7.0~ynh3
|
||||
|
||||
## Снимки экрана
|
||||
|
||||
![Снимок экрана Shiori](./doc/screenshots/screenshot.png)
|
||||
|
||||
## Документация и ресурсы
|
||||
|
||||
- Официальная документация пользователя: <https://github.com/go-shiori/shiori/wiki/Usage>
|
||||
- Официальная документация администратора: <https://github.com/go-shiori/shiori/wiki>
|
||||
- Репозиторий кода главной ветки приложения: <https://github.com/go-shiori/shiori>
|
||||
- Магазин YunoHost: <https://apps.yunohost.org/app/shiori>
|
||||
- Сообщите об ошибке: <https://github.com/YunoHost-Apps/shiori_ynh/issues>
|
||||
|
||||
## Информация для разработчиков
|
||||
|
||||
Пришлите Ваш запрос на слияние в [ветку `testing`](https://github.com/YunoHost-Apps/shiori_ynh/tree/testing).
|
||||
|
||||
Чтобы попробовать ветку `testing`, пожалуйста, сделайте что-то вроде этого:
|
||||
|
||||
```bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/shiori_ynh/tree/testing --debug
|
||||
или
|
||||
sudo yunohost app upgrade shiori -u https://github.com/YunoHost-Apps/shiori_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Больше информации о пакетировании приложений:** <https://yunohost.org/packaging_apps>
|
|
@ -28,7 +28,7 @@ Shiori is a simple bookmarks manager written in Go language. Intended as a simpl
|
|||
- Where possible, by default shiori will download a static copy of the webpage in simple text and HTML format, which later can be used as an offline archive for that page.
|
||||
|
||||
|
||||
**分发版本:** 1.7.0~ynh2
|
||||
**分发版本:** 1.7.0~ynh3
|
||||
|
||||
## 截图
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ name = "Shiori"
|
|||
description.en = "Simple bookmark manager"
|
||||
description.fr = "Gestionnaire de liens simple"
|
||||
|
||||
version = "1.7.0~ynh2"
|
||||
version = "1.7.0~ynh3"
|
||||
|
||||
maintainers = []
|
||||
|
||||
|
@ -16,7 +16,8 @@ userdoc = "https://github.com/go-shiori/shiori/wiki/Usage"
|
|||
code = "https://github.com/go-shiori/shiori"
|
||||
|
||||
[integration]
|
||||
yunohost = ">= 11.2"
|
||||
yunohost = ">= 11.2.29"
|
||||
helpers_version = "2.1"
|
||||
architectures = ["amd64", "arm64", "armhf"]
|
||||
multi_instance = true
|
||||
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# FUTURE OFFICIAL HELPERS
|
||||
# COMMON VARIABLES AND CUSTOM HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -1,44 +1,34 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# 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 /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||
#=================================================
|
||||
ynh_print_info --message="Declaring files to be backed up..."
|
||||
ynh_print_info "Declaring files to be backed up..."
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="$install_dir"
|
||||
ynh_backup "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE APP DATA DIR
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="$data_dir" --is_big
|
||||
ynh_backup "$data_dir"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
ynh_backup --src_path="/etc/logrotate.d/$app"
|
||||
ynh_backup "/etc/logrotate.d/$app"
|
||||
|
||||
ynh_backup --src_path="/etc/systemd/system/$app.service"
|
||||
ynh_backup "/etc/systemd/system/$app.service"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||
ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||
|
|
|
@ -1,49 +1,39 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC STARTING
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
#=================================================
|
||||
# STOP SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||
ynh_script_progression "Stopping $app's systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
||||
ynh_systemctl --service=$app --action="stop" --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# MODIFY URL IN NGINX CONF
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
||||
ynh_script_progression "Updating NGINX web server configuration..."
|
||||
|
||||
ynh_change_url_nginx_config
|
||||
ynh_config_change_url_nginx
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC MODIFICATIONS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating systemd service..." --weight=1
|
||||
ynh_script_progression "Updating systemd service..."
|
||||
|
||||
ynh_replace_string --match_string="--webroot $old_path" --replace_string="--webroot $new_path" --target_file="/etc/systemd/system/$app.service"
|
||||
ynh_replace --match="--webroot $old_path" --replace="--webroot $new_path" --file="/etc/systemd/system/$app.service"
|
||||
systemctl daemon-reload
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
ynh_script_progression "Starting $app's systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
||||
ynh_systemctl --service=$app --action="start" --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Change of URL completed for $app" --last
|
||||
ynh_script_progression "Change of URL completed for $app"
|
||||
|
|
|
@ -1,57 +1,43 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Setting up source files..." --weight=1
|
||||
ynh_script_progression "Setting up source files..."
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
chmod +x "$install_dir/shiori"
|
||||
|
||||
#=================================================
|
||||
# SYSTEM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Adding system configurations related to $app ..." --weight=1
|
||||
ynh_script_progression "Adding system configurations related to $app ..."
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
ynh_config_add_nginx
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
ynh_config_add_systemd
|
||||
|
||||
# Use logrotate to manage application logfile(s)
|
||||
ynh_use_logrotate
|
||||
ynh_config_add_logrotate
|
||||
|
||||
# Create log directory
|
||||
mkdir -p /var/log/$app
|
||||
touch /var/log/$app/$app.log
|
||||
chown $app -R /var/log/$app
|
||||
|
||||
yunohost service add $app --description="Simple bookmark manager" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
ynh_script_progression "Starting $app's systemd service..."
|
||||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
||||
ynh_systemctl --service=$app --action="start" --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Installation of $app completed" --last
|
||||
ynh_script_progression "Installation of $app completed"
|
||||
|
|
|
@ -1,40 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# REMOVE SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
# REMOVE SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
||||
ynh_script_progression "Removing system configurations related to $app..."
|
||||
|
||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
||||
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
||||
if ynh_hide_warnings yunohost service status $app >/dev/null
|
||||
then
|
||||
ynh_script_progression --message="Removing $app service integration..." --weight=1
|
||||
ynh_script_progression "Removing $app service integration..."
|
||||
yunohost service remove $app
|
||||
fi
|
||||
|
||||
# Remove the dedicated systemd config
|
||||
ynh_remove_systemd_config
|
||||
ynh_config_remove_systemd
|
||||
|
||||
ynh_config_remove_logrotate
|
||||
|
||||
# Remove the app-specific logrotate config
|
||||
ynh_remove_logrotate
|
||||
|
||||
# Remove the dedicated NGINX config
|
||||
ynh_remove_nginx_config
|
||||
ynh_config_remove_nginx
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Removal of $app completed" --last
|
||||
ynh_script_progression "Removal of $app completed"
|
||||
|
|
|
@ -1,60 +1,51 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# 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 /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the app main directory..." --weight=1
|
||||
ynh_script_progression "Restoring the app main directory..."
|
||||
|
||||
ynh_restore_file --origin_path="$install_dir"
|
||||
ynh_restore "$install_dir"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
chmod +x "$install_dir/shiori"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE DATA DIRECTORY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the data directory..." --weight=1
|
||||
ynh_script_progression "Restoring the data directory..."
|
||||
|
||||
ynh_restore_file --origin_path="$data_dir" --not_mandatory
|
||||
ynh_restore "$data_dir"
|
||||
|
||||
chown -R $app:www-data "$data_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
|
||||
ynh_script_progression "Restoring system configurations related to $app..."
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
||||
ynh_restore "/etc/systemd/system/$app.service"
|
||||
systemctl enable $app.service --quiet
|
||||
|
||||
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
||||
ynh_restore "/etc/logrotate.d/$app"
|
||||
|
||||
yunohost service add $app --description="Simple bookmark manager" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
|
||||
ynh_script_progression "Reloading NGINX web server and $app's service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
||||
ynh_systemctl --service=$app --action="start" --log_path="systemd"
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
ynh_systemctl --service=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Restoration completed for $app" --last
|
||||
ynh_script_progression "Restoration completed for $app"
|
||||
|
|
|
@ -1,42 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
# STOP SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||
ynh_script_progression "Stopping $app's systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
||||
ynh_systemctl --service=$app --action="stop" --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||
ynh_script_progression "Upgrading source files..."
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
chmod +x "$install_dir/shiori"
|
||||
|
||||
#=================================================
|
||||
# MIGRATE AND UPGRADE
|
||||
#=================================================
|
||||
|
||||
if ynh_compare_current_package_version --comparison lt --version 1.50~ynh9
|
||||
if ynh_app_upgrading_from_version_before 1.50~ynh9
|
||||
then
|
||||
ynh_script_progression --message="Migrating sqlite from version < 1.50~ynh9..." --weight=1
|
||||
ynh_script_progression "Migrating sqlite from version < 1.50~ynh9..."
|
||||
FTS4_EXISTS=$(sqlite3 "$data_dir/shiori.db" "SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'bookmark_content' AND sql LIKE '%USING fts4%';")
|
||||
if [ -z "$FTS4_EXISTS" ]
|
||||
then
|
||||
|
@ -63,28 +52,25 @@ if ynh_compare_current_package_version --comparison lt --version 1.50~ynh9
|
|||
#=================================================
|
||||
# REAPPLY SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
|
||||
ynh_script_progression "Upgrading system configurations related to $app..."
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
ynh_config_add_nginx
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
ynh_config_add_systemd
|
||||
|
||||
# Use logrotate to manage app-specific logfile(s)
|
||||
ynh_use_logrotate --non-append
|
||||
ynh_config_add_logrotate
|
||||
|
||||
yunohost service add $app --description="Simple bookmark manager" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
ynh_script_progression "Starting $app's systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
||||
ynh_systemctl --service=$app --action="start" --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Upgrade of $app completed" --last
|
||||
ynh_script_progression "Upgrade of $app completed"
|
||||
|
|
2
sources/extra_files/app/.gitignore
vendored
2
sources/extra_files/app/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
*~
|
||||
*.sw[op]
|
2
sources/patches/.gitignore
vendored
2
sources/patches/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
*~
|
||||
*.sw[op]
|
Loading…
Reference in a new issue