mirror of
https://github.com/YunoHost-Apps/watchdog_ynh.git
synced 2024-06-22 05:42:53 +02:00
commit
c9c5e06df3
17 changed files with 190 additions and 76 deletions
|
@ -1,6 +1,8 @@
|
|||
# All available README files by language
|
||||
|
||||
- [Read the README in English](README.md)
|
||||
- [Lea el README en español](README_es.md)
|
||||
- [Irakurri README euskaraz](README_eu.md)
|
||||
- [Lire le README en français](README_fr.md)
|
||||
- [Le o README en galego](README_gl.md)
|
||||
- [Leggi il “README” in italiano](README_it.md)
|
||||
- [阅读中文(简体)的 README](README_zh_Hans.md)
|
||||
|
|
|
@ -9,7 +9,7 @@ It shall NOT be edited by hand.
|
|||
|
||||
[](https://install-app.yunohost.org/?app=watchdog)
|
||||
|
||||
*[Read this README is other languages.](./ALL_README.md)*
|
||||
*[Read this README in other languages.](./ALL_README.md)*
|
||||
|
||||
> *This package allows you to install Watchdog quickly and simply on a YunoHost server.*
|
||||
> *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.*
|
||||
|
@ -17,14 +17,14 @@ It shall NOT be edited by hand.
|
|||
## Overview
|
||||
|
||||
A watchdog service makes sure your server is still running and reboots it if necessary.
|
||||
It better (only?) works if your server has a hardware watchdog device.
|
||||
It better (only?) works if your server has a [hardware watchdog device](https://en.wikipedia.org/wiki/Watchdog_timer).
|
||||
|
||||
The included sercice will regularly write to `/dev/watchdog`. If it stops, then the freeze is detected and server rebooted.
|
||||
|
||||
This app has only been tested on Raspberry Pi.
|
||||
|
||||
|
||||
**Shipped version:** 5.16~ynh1
|
||||
**Shipped version:** 5.16~ynh2
|
||||
## Documentation and resources
|
||||
|
||||
- Upstream app code repository: <https://sourceforge.net/projects/watchdog/>
|
||||
|
|
46
README_es.md
Normal file
46
README_es.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
<!--
|
||||
Este archivo README esta generado automaticamente<https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
|
||||
No se debe editar a mano.
|
||||
-->
|
||||
|
||||
# Watchdog para Yunohost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/watchdog)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=watchdog)
|
||||
|
||||
*[Leer este README en otros idiomas.](./ALL_README.md)*
|
||||
|
||||
> *Este paquete le permite instalarWatchdog rapidamente y simplement en un servidor YunoHost.*
|
||||
> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.*
|
||||
|
||||
## Descripción general
|
||||
|
||||
A watchdog service makes sure your server is still running and reboots it if necessary.
|
||||
It better (only?) works if your server has a [hardware watchdog device](https://en.wikipedia.org/wiki/Watchdog_timer).
|
||||
|
||||
The included sercice will regularly write to `/dev/watchdog`. If it stops, then the freeze is detected and server rebooted.
|
||||
|
||||
This app has only been tested on Raspberry Pi.
|
||||
|
||||
|
||||
**Versión actual:** 5.16~ynh2
|
||||
## Documentaciones y recursos
|
||||
|
||||
- Repositorio del código fuente oficial de la aplicación : <https://sourceforge.net/projects/watchdog/>
|
||||
- Catálogo YunoHost: <https://apps.yunohost.org/app/watchdog>
|
||||
- Reportar un error: <https://github.com/YunoHost-Apps/watchdog_ynh/issues>
|
||||
|
||||
## Información para desarrolladores
|
||||
|
||||
Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/watchdog_ynh/tree/testing
|
||||
|
||||
Para probar la rama `testing`, sigue asÍ:
|
||||
|
||||
```bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/watchdog_ynh/tree/testing --debug
|
||||
o
|
||||
sudo yunohost app upgrade watchdog -u https://github.com/YunoHost-Apps/watchdog_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Mas informaciones sobre el empaquetado de aplicaciones:** <https://yunohost.org/packaging_apps>
|
46
README_eu.md
Normal file
46
README_eu.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
<!--
|
||||
Ohart ongi: README hau automatikoki sortu da <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>ri esker
|
||||
EZ editatu eskuz.
|
||||
-->
|
||||
|
||||
# Watchdog YunoHost-erako
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/watchdog)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=watchdog)
|
||||
|
||||
*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)*
|
||||
|
||||
> *Pakete honek Watchdog YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.*
|
||||
> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.*
|
||||
|
||||
## Aurreikuspena
|
||||
|
||||
A watchdog service makes sure your server is still running and reboots it if necessary.
|
||||
It better (only?) works if your server has a [hardware watchdog device](https://en.wikipedia.org/wiki/Watchdog_timer).
|
||||
|
||||
The included sercice will regularly write to `/dev/watchdog`. If it stops, then the freeze is detected and server rebooted.
|
||||
|
||||
This app has only been tested on Raspberry Pi.
|
||||
|
||||
|
||||
**Paketatutako bertsioa:** 5.16~ynh2
|
||||
## Dokumentazioa eta baliabideak
|
||||
|
||||
- Jatorrizko aplikazioaren kode-gordailua: <https://sourceforge.net/projects/watchdog/>
|
||||
- YunoHost Denda: <https://apps.yunohost.org/app/watchdog>
|
||||
- Eman errore baten berri: <https://github.com/YunoHost-Apps/watchdog_ynh/issues>
|
||||
|
||||
## Garatzaileentzako informazioa
|
||||
|
||||
Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/watchdog_ynh/tree/testing).
|
||||
|
||||
`testing` abarra probatzeko, ondorengoa egin:
|
||||
|
||||
```bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/watchdog_ynh/tree/testing --debug
|
||||
edo
|
||||
sudo yunohost app upgrade watchdog -u https://github.com/YunoHost-Apps/watchdog_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Informazio gehiago aplikazioaren paketatzeari buruz:** <https://yunohost.org/packaging_apps>
|
|
@ -17,14 +17,14 @@ Il NE doit PAS être modifié à la main.
|
|||
## Vue d’ensemble
|
||||
|
||||
Un service de surveillance *watchdog* s'assure que votre serveur tourne toujours, et le redémarre si nécessaire.
|
||||
Il tournera préférentiellement (uniquement?) si votre serveur est équipé d'un *watchdog* matériel.
|
||||
Il tournera préférentiellement (uniquement?) si votre serveur est équipé d'un [*watchdog*](https://fr.wikipedia.org/wiki/Chien_de_garde_(informatique)) matériel.
|
||||
|
||||
Le service inclut ira régulièrement écrire dans `/dev/watchdog`. S'il s'arrête, le plantage est alors détecté et résolu par un redémarrage du système.
|
||||
|
||||
Cette application n'a été testée que sur Raspberry Pi.
|
||||
|
||||
|
||||
**Version incluse :** 5.16~ynh1
|
||||
**Version incluse :** 5.16~ynh2
|
||||
## Documentations et ressources
|
||||
|
||||
- Dépôt de code officiel de l’app : <https://sourceforge.net/projects/watchdog/>
|
||||
|
|
|
@ -17,14 +17,14 @@ NON debe editarse manualmente.
|
|||
## Vista xeral
|
||||
|
||||
A watchdog service makes sure your server is still running and reboots it if necessary.
|
||||
It better (only?) works if your server has a hardware watchdog device.
|
||||
It better (only?) works if your server has a [hardware watchdog device](https://en.wikipedia.org/wiki/Watchdog_timer).
|
||||
|
||||
The included sercice will regularly write to `/dev/watchdog`. If it stops, then the freeze is detected and server rebooted.
|
||||
|
||||
This app has only been tested on Raspberry Pi.
|
||||
|
||||
|
||||
**Versión proporcionada:** 5.16~ynh1
|
||||
**Versión proporcionada:** 5.16~ynh2
|
||||
## Documentación e recursos
|
||||
|
||||
- Repositorio de orixe do código: <https://sourceforge.net/projects/watchdog/>
|
||||
|
|
46
README_zh_Hans.md
Normal file
46
README_zh_Hans.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
<!--
|
||||
注意:此 README 由 <https://github.com/YunoHost/apps/tree/master/tools/readme_generator> 自动生成
|
||||
请勿手动编辑。
|
||||
-->
|
||||
|
||||
# YunoHost 上的 Watchdog
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/watchdog)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=watchdog)
|
||||
|
||||
*[阅读此 README 的其它语言版本。](./ALL_README.md)*
|
||||
|
||||
> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 Watchdog。*
|
||||
> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。*
|
||||
|
||||
## 概况
|
||||
|
||||
A watchdog service makes sure your server is still running and reboots it if necessary.
|
||||
It better (only?) works if your server has a [hardware watchdog device](https://en.wikipedia.org/wiki/Watchdog_timer).
|
||||
|
||||
The included sercice will regularly write to `/dev/watchdog`. If it stops, then the freeze is detected and server rebooted.
|
||||
|
||||
This app has only been tested on Raspberry Pi.
|
||||
|
||||
|
||||
**分发版本:** 5.16~ynh2
|
||||
## 文档与资源
|
||||
|
||||
- 上游应用代码库: <https://sourceforge.net/projects/watchdog/>
|
||||
- YunoHost 商店: <https://apps.yunohost.org/app/watchdog>
|
||||
- 报告 bug: <https://github.com/YunoHost-Apps/watchdog_ynh/issues>
|
||||
|
||||
## 开发者信息
|
||||
|
||||
请向 [`testing` 分支](https://github.com/YunoHost-Apps/watchdog_ynh/tree/testing) 发送拉取请求。
|
||||
|
||||
如要尝试 `testing` 分支,请这样操作:
|
||||
|
||||
```bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/watchdog_ynh/tree/testing --debug
|
||||
或
|
||||
sudo yunohost app upgrade watchdog -u https://github.com/YunoHost-Apps/watchdog_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**有关应用打包的更多信息:** <https://yunohost.org/packaging_apps>
|
|
@ -1,5 +1,5 @@
|
|||
A watchdog service makes sure your server is still running and reboots it if necessary.
|
||||
It better (only?) works if your server has a hardware watchdog device.
|
||||
It better (only?) works if your server has a [hardware watchdog device](https://en.wikipedia.org/wiki/Watchdog_timer).
|
||||
|
||||
The included sercice will regularly write to `/dev/watchdog`. If it stops, then the freeze is detected and server rebooted.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Un service de surveillance *watchdog* s'assure que votre serveur tourne toujours, et le redémarre si nécessaire.
|
||||
Il tournera préférentiellement (uniquement?) si votre serveur est équipé d'un *watchdog* matériel.
|
||||
Il tournera préférentiellement (uniquement?) si votre serveur est équipé d'un [*watchdog*](https://fr.wikipedia.org/wiki/Chien_de_garde_(informatique)) matériel.
|
||||
|
||||
Le service inclut ira régulièrement écrire dans `/dev/watchdog`. S'il s'arrête, le plantage est alors détecté et résolu par un redémarrage du système.
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
Your device boot configuration has been updated to enable the hardware watchdog.
|
||||
|
||||
Please reboot it.
|
||||
Please reboot your server.
|
||||
|
|
3
doc/POST_INSTALL_fr.md
Normal file
3
doc/POST_INSTALL_fr.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
La configuration de démarrage de votre appareil a été mise à jour pour activer le chien de garde matériel.
|
||||
|
||||
Veuillez redémarrer votre server.
|
|
@ -1,3 +1,5 @@
|
|||
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json
|
||||
|
||||
packaging_format = 2
|
||||
|
||||
id = "watchdog"
|
||||
|
@ -6,7 +8,7 @@ name = "Watchdog"
|
|||
description.en = "Automatically reboot your server in case of freeze"
|
||||
description.fr = "Redémarre automatiquement votre serveur en cas de plantage"
|
||||
|
||||
version = "5.16~ynh1"
|
||||
version = "5.16~ynh2"
|
||||
|
||||
maintainers = ["tituspijean"]
|
||||
|
||||
|
@ -30,4 +32,4 @@ ram.runtime = "50M"
|
|||
[resources]
|
||||
|
||||
[resources.apt]
|
||||
packages = "watchdog"
|
||||
packages = ["watchdog"]
|
||||
|
|
|
@ -18,6 +18,10 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
|
||||
ynh_backup --src_path="/etc/watchdog.conf"
|
||||
|
||||
# Remove other various files specific to the app... such as :
|
||||
|
||||
ynh_backup --src_path="/var/log/$app"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
@ -9,8 +7,14 @@ source _common.sh
|
|||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
# WATCHDOG DEVICE CHECK
|
||||
#=================================================
|
||||
ynh_script_progression --message="Checking the hardware watchdog device presence..."
|
||||
|
||||
# Don't issue this error in CI
|
||||
if [ "${PACKAGE_CHECK_EXEC:-0}" -eq 0 ] && [ ! -f /dev/watchdog ]; then
|
||||
ynh_die --message="Your server doesn't seem to have a '/dev/watchdog' device, this certainly means that it has no hardware watchdog device. However, this package is only relevant if such a device exists, we're sorry."
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# SYSTEM CONFIGURATION
|
||||
|
@ -22,28 +26,19 @@ if [[ $(grep -ic "Raspberry Pi" /proc/cpuinfo) -ge 1 && $(grep -ic "dtparam=watc
|
|||
echo "dtparam=watchdog=on" >> /boot/config.txt
|
||||
fi
|
||||
|
||||
yunohost service add $app
|
||||
|
||||
#=================================================
|
||||
# APP INITIAL CONFIGURATION
|
||||
#=================================================
|
||||
# ADD A CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Adding app's configuration file..."
|
||||
|
||||
ynh_add_config --template="watchdog.conf" --destination="/etc/watchdog.conf"
|
||||
|
||||
chmod 400 "/etc/watchdog.conf"
|
||||
chown root: "/etc/watchdog.conf"
|
||||
|
||||
systemctl enable "$app.service" --quiet
|
||||
yunohost service add "$app"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting app's systemd service..."
|
||||
|
||||
# Enable and start a systemd service
|
||||
systemctl enable $app.service --quiet
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
||||
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -1,35 +1,25 @@
|
|||
#!/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..."
|
||||
|
||||
# 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
|
||||
then
|
||||
ynh_script_progression --message="Removing $app service integration..."
|
||||
yunohost service remove $app
|
||||
if ynh_exec_warn_less yunohost service status $app >/dev/null; then
|
||||
yunohost service remove "$app"
|
||||
fi
|
||||
|
||||
ynh_remove_systemd_config
|
||||
|
||||
ynh_remove_nginx_config
|
||||
|
||||
# Remove other various files specific to the app... such as :
|
||||
|
||||
ynh_secure_remove --file="/var/log/$app"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
@ -17,12 +15,11 @@ ynh_script_progression --message="Restoring system configurations related to $ap
|
|||
|
||||
ynh_restore_file --origin_path="/etc/watchdog.conf"
|
||||
|
||||
systemctl enable $app.service --quiet
|
||||
systemctl enable "$app.service" --quiet
|
||||
yunohost service add "$app"
|
||||
|
||||
yunohost service add $app
|
||||
ynh_restore_file --origin_path="/var/log/$app"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
|
||||
#=================================================
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
@ -9,14 +7,6 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# STOP SYSTEMD SERVICE
|
||||
#=================================================
|
||||
|
@ -29,26 +19,19 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Upgrading system configurations related to $app..."
|
||||
|
||||
yunohost service add $app
|
||||
|
||||
#=================================================
|
||||
# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...)
|
||||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating a configuration file..."
|
||||
|
||||
ynh_add_config --template="watchdog.conf" --destination="/etc/watchdog.conf"
|
||||
|
||||
chmod 400 "/etc/watchdog.conf"
|
||||
chown root: "/etc/watchdog.conf"
|
||||
|
||||
systemctl enable "$app.service" --quiet
|
||||
yunohost service add "$app"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..."
|
||||
ynh_script_progression --message="Starting $app's systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
||||
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
Loading…
Add table
Reference in a new issue