Package improvement (#31)

* fix manifest

* fix tabs

* add Services section in manifest

* Fix invalid JSON
open an issue https://dev.yunohost.org/issues/1097

* fix "Impossible de satisfaire les pré-requis pour vpnclient : Paquet «
yunohost-moulinette » inconnu"

* finalisation manifest.json et harmonisation avec
https://yunohost.org/#/packaging_apps_manifest_fr

* ajout de du CI avec .travis.yml

* Update README.md

* lifting manifest.json

* remove exit 0 from scrits and add .gitignore

* fix lint error with exit

* fix #31

* refix #31
This commit is contained in:
agentcobra 2018-03-23 09:23:57 +01:00 committed by Sebastien Badia
parent 355b24ea0c
commit 8aab3c7dd2
10 changed files with 35 additions and 24 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
# Created from https://github.com/YunoHost/example_ynh/blob/master/.gitignore
*~
*.sw[op]

8
.travis.yml Normal file
View File

@ -0,0 +1,8 @@
language: php
before_script:
- git clone --depth 1 git://github.com/YunoHost/package_linter ../package_linter && cd ../package_linter
- mv ../vpnclient_ynh vpnclient_ynh
script:
- ./package_linter.py vpnclient_ynh

View File

@ -1,4 +1,5 @@
# VPN Client
[![Build Status](https://travis-ci.org/labriqueinternet/vpnclient_ynh.svg?branch=master)](https://travis-ci.org/labriqueinternet/vpnclient_ynh)
## Overview
VPN Client app for [YunoHost](http://yunohost.org/).

View File

@ -1,32 +1,46 @@
{
"name": "VPN Client",
"id": "vpnclient",
"packaging_format": 1,
"description": {
"en": "VPN Client",
"fr": "Client VPN"
},
"license": "AGPL-3",
"developer": {
"url": "https://github.com/labriqueinternet/vpnclient_ynh",
"version": "1.0.0",
"license": "AGPL-3.0",
"maintainer": {
"name": "Julien Vaubourg",
"email": "julien@vaubourg.com",
"url": "http://julien.vaubourg.com"
},
"multi_instance": "false",
"requirements": {
"yunohost": ">= 2.2.0",
"moulinette": ">= 2.4.0"
},
"multi_instance": false,
"services": [
"nginx",
"php5-fpm",
"ynh-vpnclient"
],
"arguments": {
"install" : [
"install": [
{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain for the web administration",
"fr": "Choisissez un domaine pour l'administration web"
"en": "Choose a domain for the web administration",
"fr": "Choisissez un domaine pour l'administration web"
},
"example": "domain.org"
},
{
"name": "path",
"type": "path",
"ask": {
"en": "Choose a path for the web administration",
"fr": "Choisissez un chemin pour l'administration web"
"en": "Choose a path for the web administration",
"fr": "Choisissez un chemin pour l'administration web"
},
"example": "/vpnadmin",
"default": "/vpnadmin"

View File

@ -6,4 +6,3 @@ mkdir -p "${backup_dir}/"
sudo cp -a /etc/openvpn/keys/ "${backup_dir}/"
sudo cp -a /etc/openvpn/client.conf.tpl "${backup_dir}/"
exit 0

View File

@ -26,11 +26,10 @@ url_path=${2}
if ! $upgrade; then
source ./helpers
source ./prerequisites
fi
# Check domain/path availability
ynh_webpath_register vpnclient $domain $url_path || exit 1
ynh_webpath_register vpnclient $domain $url_path || ynh_die "problem on domain/path availability" 1
# Install packages
packages='php5-fpm sipcalc dnsutils openvpn curl'
@ -150,4 +149,3 @@ fi
sudo yunohost app ssowatconf
exit 0

View File

@ -1,8 +0,0 @@
# Source me
# Check YunoHost version (firewall hook in Moulinette)
ynh_version=$(sudo dpkg -l yunohost | grep ii | awk '{ print $3 }' | sed 's/\.//g')
if [ "${ynh_version}" -lt 240 ]; then
echo "WARN: You need a YunoHost's version equals or greater than 2.4.0 for activating the firewalling" >&2
fi

View File

@ -50,4 +50,3 @@ sudo systemctl reload nginx
# Remove sources
sudo rm -rf /var/www/vpnadmin/
exit 0

View File

@ -18,4 +18,3 @@ bash ./upgrade
sudo rm -r "${tmpdir}/"
exit 0

View File

@ -8,7 +8,6 @@ ynh_setting() {
}
source ./helpers
source ./prerequisites
domain=$(ynh_setting vpnclient domain)
path=$(ynh_setting vpnclient path)
@ -44,4 +43,3 @@ fi
ynh_systemctl start ynh-vpnclient
exit 0