Commit 0ab41611 authored by Ilja's avatar Ilja
Browse files

Merge branch 'fix-27_super-old_deprecated_packaging_practices' into 'unstable'

fix-27_super-old_deprecated_packaging_practices

See merge request !34
parents b285c4f4 8a7d3419
# Overview
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
[![Integration level](https://dash.yunohost.org/integration/neutrinet.svg)](https://dash.yunohost.org/appci/app/neutrinet) [![](https://ci-apps.yunohost.org/ci/badges/neutrinet.status.svg)](https://ci-apps.yunohost.org/ci/badges/neutrinet.status.svg) [![](https://ci-apps.yunohost.org/ci/badges/neutrinet.maintain.svg)](https://ci-apps.yunohost.org/ci/badges/neutrinet.maintain.svg)
# Neutrinet for YunoHost
[![Install Neutrinet with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=neutrinet)
[![Integration level](https://dash.yunohost.org/integration/neutrinet.svg)](https://dash.yunohost.org/appci/app/neutrinet) ![](https://ci-apps.yunohost.org/ci/badges/neutrinet.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/neutrinet.maintain.svg)
[![Install Neutrinet with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=neutrinet)
The neutrinet application is for Neutrinet members that have an Internet Cube configured and does 2 things:
* It renews the vpn-certificates
* It adds a webpage with general information about Neutrinet
*[Lire ce readme en français.](./README_fr.md)*
# Installation
> *This package allows you to install Neutrinet 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.*
## From the web interface
## Overview
1. Go to the admin interface
2. Click *Applications*
3. Click *Install* button
4. Select *All apps* on the right
5. Search for *neutrinet*
6. Click *Install*
7. Fill in the form (or just keep the defaults) and click *Install* just like you would install any app from the web interface
The Neutrinet application is for Neutrinet members that have a Neutrinet VPN. It automatically checks and renews the VPN certificates. This package also contains a web page with contact information and other useful links.
## From the CLI
```shell
yunohost app install neutrinet --debug
```
**Shipped version:** 0.3.1~ynh3
## Debugging
## Disclaimers / important information
### For contributers
#### Debugging
You can manually run the cron job that attempts to renew the certificates:
```shell
......@@ -44,16 +43,37 @@ You can increase the verbosity with the option `-v`:
sudo ./renew_cert_cron.sh -v
```
# For contributers
## Contributing
* Bugs, feature requests and other issues can be logged on the issue tracker at https://git.domainepublic.net/Neutrinet/neutrinet_ynh/issues
* Merge requests should be submitted at https://git.domainepublic.net/Neutrinet/neutrinet_ynh
* Merge requests should be done to the `unstable` branch
To install the app without checking for certificates, run `export PACKAGE_CHECK_EXEC=1`.
#### Publish a new version of the app
## Publish a new version of the app
* Make sure the app passes the package check <https://github.com/YunoHost/package_check>
* Merging to stable will automatically make it available for updating since we used the ref `stable` in <https://github.com/YunoHost/apps/blob/master/apps.json>
* Edit the [manifest](manifest.json) file to bump the version
* Edit the [upgrade](scripts/upgrade) script with the needed upgrades for previous installations
* Test the updated version both for new installs and upgrades and make sure the other scripts ([backup](scripts/backup), [remove](scripts/remove) and [upgrade](scripts/upgrade)) also still work
* In the [apps.json](https://neutrinet.be/apps.json) file you must update the `revision` with the current `sha` on the `stable` branch of the package and update the `lastUpdate` field. If you added things to the manifest file, you should add these changes ass well
## Documentation and resources
* Upstream app code repository: https://git.domainepublic.net/Neutrinet/renew_cert
* Report a bug: https://git.domainepublic.net/Neutrinet/neutrinet_ynh/issues
## Developer info
Please send your pull request to the [unstable branch](https://git.domainepublic.net/Neutrinet/neutrinet_ynh/-/tree/unstable).
To try the unstable branch, please proceed like that.
```sh
git clone https://git.domainepublic.net/Neutrinet/neutrinet_ynh/
cd neutrinet_ynh
git checkout unstable
cd ..
sudo yunohost app install neutrinet_ynh --debug
```
or
```sh
git clone https://git.domainepublic.net/Neutrinet/neutrinet_ynh/
cd neutrinet_ynh
git checkout unstable
cd ..
sudo yunohost app upgrade neutrinet_ynh --debug
```
**More info regarding app packaging:** https://yunohost.org/packaging_apps
# Neutrinet pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/neutrinet.svg)](https://dash.yunohost.org/appci/app/neutrinet) ![](https://ci-apps.yunohost.org/ci/badges/neutrinet.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/neutrinet.maintain.svg)
[![Installer Neutrinet avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=neutrinet)
*[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*
> *Ce package vous permet d'installer Neutrinet rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
## Vue d'ensemble
The Neutrinet application is for Neutrinet members that have a Neutrinet VPN. It automatically checks and renews the VPN certificates. This package also contains a web page with contact information and other useful links.
**Version incluse :** 0.3.1~ynh3
## Avertissements / informations importantes
### For contributers
#### Debugging
You can manually run the cron job that attempts to renew the certificates:
```shell
sudo /etc/cron.daily/neutrinet-renew-cert
```
This actually runs the script in `/opt/neutrinet/renew_cert/`:
```shell
cd /opt/neutrinet/renew_cert
sudo ./renew_cert_cron.sh
```
You can increase the verbosity with the option `-v`:
```shell
sudo ./renew_cert_cron.sh -v
```
To install the app without checking for certificates, run `export PACKAGE_CHECK_EXEC=1`.
#### Publish a new version of the app
* Make sure the app passes the package check <https://github.com/YunoHost/package_check>
* Merging to stable will automatically make it available for updating since we used the ref `stable` in <https://github.com/YunoHost/apps/blob/master/apps.json>
## Documentations et ressources
* Dépôt de code officiel de l'app : https://git.domainepublic.net/Neutrinet/renew_cert
* Signaler un bug : https://git.domainepublic.net/Neutrinet/neutrinet_ynh/issues
## Informations pour les développeurs
Merci de faire vos pull request sur la [branche unstable](https://git.domainepublic.net/Neutrinet/neutrinet_ynh/-/tree/unstable).
Pour essayer la branche testing, procédez comme suit.
```sh
git clone https://git.domainepublic.net/Neutrinet/neutrinet_ynh/
cd neutrinet_ynh
git checkout unstable
cd ..
sudo yunohost app install neutrinet_ynh --debug
```
ou
```sh
git clone https://git.domainepublic.net/Neutrinet/neutrinet_ynh/
cd neutrinet_ynh
git checkout unstable
cd ..
sudo yunohost app upgrade neutrinet_ynh --debug
```
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps
;; Default test serie
; pre-install
; pre-upgrade
; Manifest
is_public=0
; Actions
; Config_panel
; Checks
pkg_linter=1
setup_sub_dir=1
setup_root=1
setup_nourl=0
setup_private=1
setup_public=0
upgrade=1
# Here we can test upgrades from previous commits. Add the commit of the last stable here
# 0.3.1~ynh2
upgrade=1 from_commit=7afd659c62304c28c8f7232d931a3f2ea49be5f3
backup_restore=1
multi_instance=0
port_already_use=0
change_url=1
actions=0
config_panel=0
;;; Upgrade options
The Neutrinet application is for Neutrinet members that have a Neutrinet VPN. It automatically checks and renews the VPN certificates. This package also contains a web page with contact information and other useful links.
### For contributers
#### Debugging
You can manually run the cron job that attempts to renew the certificates:
```shell
sudo /etc/cron.daily/neutrinet-renew-cert
```
This actually runs the script in `/opt/neutrinet/renew_cert/`:
```shell
cd /opt/neutrinet/renew_cert
sudo ./renew_cert_cron.sh
```
You can increase the verbosity with the option `-v`:
```shell
sudo ./renew_cert_cron.sh -v
```
To install the app without checking for certificates, run `export PACKAGE_CHECK_EXEC=1`.
#### Publish a new version of the app
* Make sure the app passes the package check <https://github.com/YunoHost/package_check>
* Merging to stable will automatically make it available for updating since we used the ref `stable` in <https://github.com/YunoHost/apps/blob/master/apps.json>
## Documentation and resources
* Upstream app code repository: https://git.domainepublic.net/Neutrinet/renew_cert
* Report a bug: https://git.domainepublic.net/Neutrinet/neutrinet_ynh/issues
## Developer info
Please send your pull request to the [unstable branch](https://git.domainepublic.net/Neutrinet/neutrinet_ynh/-/tree/unstable).
To try the unstable branch, please proceed like that.
```sh
git clone https://git.domainepublic.net/Neutrinet/neutrinet_ynh/
cd neutrinet_ynh
git checkout unstable
cd ..
sudo yunohost app install neutrinet_ynh --debug
```
or
```sh
git clone https://git.domainepublic.net/Neutrinet/neutrinet_ynh/
cd neutrinet_ynh
git checkout unstable
cd ..
sudo yunohost app upgrade neutrinet_ynh --debug
```
**More info regarding app packaging:** https://yunohost.org/packaging_apps
### For contributers
#### Debugging
You can manually run the cron job that attempts to renew the certificates:
```shell
sudo /etc/cron.daily/neutrinet-renew-cert
```
This actually runs the script in `/opt/neutrinet/renew_cert/`:
```shell
cd /opt/neutrinet/renew_cert
sudo ./renew_cert_cron.sh
```
You can increase the verbosity with the option `-v`:
```shell
sudo ./renew_cert_cron.sh -v
```
To install the app without checking for certificates, run `export PACKAGE_CHECK_EXEC=1`.
#### Publish a new version of the app
* Make sure the app passes the package check <https://github.com/YunoHost/package_check>
* Merging to stable will automatically make it available for updating since we used the ref `stable` in <https://github.com/YunoHost/apps/blob/master/apps.json>
## Documentations et ressources
* Dépôt de code officiel de l'app : https://git.domainepublic.net/Neutrinet/renew_cert
* Signaler un bug : https://git.domainepublic.net/Neutrinet/neutrinet_ynh/issues
## Informations pour les développeurs
Merci de faire vos pull request sur la [branche unstable](https://git.domainepublic.net/Neutrinet/neutrinet_ynh/-/tree/unstable).
Pour essayer la branche testing, procédez comme suit.
```sh
git clone https://git.domainepublic.net/Neutrinet/neutrinet_ynh/
cd neutrinet_ynh
git checkout unstable
cd ..
sudo yunohost app install neutrinet_ynh --debug
```
ou
```sh
git clone https://git.domainepublic.net/Neutrinet/neutrinet_ynh/
cd neutrinet_ynh
git checkout unstable
cd ..
sudo yunohost app upgrade neutrinet_ynh --debug
```
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps
......@@ -6,15 +6,20 @@
"en": "Auto renewal for the Neutrinet vpn-certificates",
"fr": "Renouvellement automatique des certificats vpn Neutrinet"
},
"version": "0.3.1~ynh2",
"version": "0.3.1~ynh3",
"url": "https://git.domainepublic.net/Neutrinet/neutrinet_ynh",
"upstream": {
"license": "AGPL-3.0-or-later",
"code": "https://git.domainepublic.net/Neutrinet/renew_cert"
},
"license": "AGPL-3.0-or-later",
"maintainer": {
"name": "ilja",
"email": "neutrinet@spectraltheorem.be",
"url": "https://gitlab.com/Spctrl"
"name": "Neutrinet",
"email": "contact@neutrinet.be",
"url": "https://neutrinet.be"
},
"requirements": {
"yunohost": ">= 3.5.0"
"yunohost": ">= 4.3.0"
},
"multi_instance": false,
"services": [
......@@ -24,20 +29,11 @@
"install" : [
{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain for Neutrinet application",
"fr": "Choisissez un domaine pour l'application Neutrinet"
},
"example": "domain.org"
"type": "domain"
},
{
"name": "path",
"type": "path",
"ask": {
"en": "Choose a path for Neutrinet application",
"fr": "Choisissez un chemin pour l'application Neutrinet"
},
"example": "/neutrinet",
"default": "/neutrinet"
}
......
......@@ -34,8 +34,6 @@ nginx_path=/etc/nginx/conf.d/$domain.d/$app.conf
# BACKUP THE NGINX CONFIGURATION
#=================================================
ynh_script_progression "Backing up..."
ynh_backup "$final_path"
ynh_backup "$nginx_path"
......
......@@ -72,8 +72,10 @@ ynh_system_user_create $app_user $final_path
ynh_script_progression "Installing static site…"
cp -a ../sources/. $final_path
chown -R $app_user: $final_path
cp -r ../sources/. $final_path
chown -R $app_user:www-data $final_path
find ${final_path} -type d -exec chmod 0750 {} \;
find ${final_path} -type f -exec chmod 0640 {} \;
ynh_add_nginx_config
......
......@@ -62,7 +62,9 @@ ynh_script_progression "Restoring static site…"
ynh_restore_file "$final_path"
ynh_restore_file "$nginx_path"
chown -R $app_user: "$final_path"
chown -R $app_user:www-data $final_path
find ${final_path} -type d -exec chmod 0750 {} \;
find ${final_path} -type f -exec chmod 0640 {} \;
nginx -tq
ynh_systemd_action nginx reload
......
......@@ -104,7 +104,9 @@ ynh_script_progression "Installing static site..."
ynh_secure_remove $final_path
mkdir -p $final_path
cp -r ../sources/. $final_path
chown -R $app_user: $final_path
chown -R $app_user:www-data $final_path
find ${final_path} -type d -exec chmod 0750 {} \;
find ${final_path} -type f -exec chmod 0640 {} \;
ynh_add_nginx_config
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment