mirror of
https://github.com/YunoHost-Apps/distbin_ynh.git
synced 2024-09-03 18:26:10 +02:00
Apply last example_ynh
This commit is contained in:
parent
c0b8f66249
commit
ce07f8bd2c
7 changed files with 54 additions and 19 deletions
|
@ -1,17 +1,14 @@
|
||||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||||
location __PATH__/ {
|
location __PATH__/ {
|
||||||
|
|
||||||
# Path to source
|
|
||||||
alias __FINALPATH__/ ;
|
|
||||||
|
|
||||||
# Force usage of https
|
# Force usage of https
|
||||||
if ($scheme = http) {
|
if ($scheme = http) {
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
}
|
}
|
||||||
|
|
||||||
proxy_pass http://127.0.0.1:__PORT__/;
|
proxy_pass http://127.0.0.1:__PORT__/;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_buffering off;
|
# proxy_buffering off;
|
||||||
|
|
||||||
# Include SSOWAT user panel.
|
# Include SSOWAT user panel.
|
||||||
include conf.d/yunohost_panel.conf.inc;
|
include conf.d/yunohost_panel.conf.inc;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Distributed pastebin with ActivityPub.",
|
"en": "Distributed pastebin with ActivityPub.",
|
||||||
"fr": "Pastebin distribué utilisant le protocole ActivityPub."
|
"fr": "Pastebin distribué utilisant le protocole ActivityPub."
|
||||||
},
|
},
|
||||||
"version": "1.0~ynh5",
|
"version": "1.0~ynh6",
|
||||||
"url": "https://example.com",
|
"url": "https://example.com",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
|
23
pull_request_template.md
Normal file
23
pull_request_template.md
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
## Problem
|
||||||
|
- *Description of why you made this PR*
|
||||||
|
|
||||||
|
## Solution
|
||||||
|
- *And how do you fix that problem*
|
||||||
|
|
||||||
|
## PR Status
|
||||||
|
- [ ] Code finished.
|
||||||
|
- [ ] Tested with Package_check.
|
||||||
|
- [ ] Fix or enhancement tested.
|
||||||
|
- [ ] Upgrade from last version tested.
|
||||||
|
- [ ] Can be reviewed and tested.
|
||||||
|
|
||||||
|
## Validation
|
||||||
|
---
|
||||||
|
- [ ] **Code review**
|
||||||
|
- [ ] **Approval (LGTM)**
|
||||||
|
*Code review and approval have to be from a member of @YunoHost/apps group*
|
||||||
|
- **CI succeeded** :
|
||||||
|
[![Build Status](https://ci-apps-hq.yunohost.org/jenkins/job/distbin_ynh%20-BRANCH-/badge/icon)](https://ci-apps-hq.yunohost.org/jenkins/job/distbin_ynh%20-BRANCH-/)
|
||||||
|
*Please replace '-BRANCH-' in this link by the name of the branch used.*
|
||||||
|
*If the PR is from a forked repository. Please provide public results from package_check.*
|
||||||
|
When the PR is marked as ready to merge, you have to wait for 3 days before really merging it.
|
|
@ -1,5 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# COMMON VARIABLES
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# dependencies used by the app
|
||||||
|
pkg_dependencies="ca-certificates"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -101,7 +101,7 @@ ynh_print_info "Installing dependencies ..."
|
||||||
### - As well as the section "REINSTALL DEPENDENCIES" in the restore script
|
### - As well as the section "REINSTALL DEPENDENCIES" in the restore script
|
||||||
### - And the section "UPGRADE DEPENDENCIES" in the upgrade script
|
### - And the section "UPGRADE DEPENDENCIES" in the upgrade script
|
||||||
|
|
||||||
ynh_install_app_dependencies ca-certificates
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
ynh_install_nodejs 8
|
ynh_install_nodejs 8
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
# 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 ../settings/scripts/ynh_systemd_action
|
source ../settings/scripts/ynh_systemd_action
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
@ -73,18 +74,22 @@ ynh_system_user_create "$app" "$final_path"
|
||||||
# Restore permissions on app files
|
# Restore permissions on app files
|
||||||
chown -R "$app":"$app" "$final_path"
|
chown -R "$app":"$app" "$final_path"
|
||||||
|
|
||||||
mkdir -p /var/log/$app
|
|
||||||
chown -R $app:$app /var/log/$app
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC RESTORATION
|
# SPECIFIC RESTORATION
|
||||||
|
#=================================================
|
||||||
|
# CREATE LOG FOLDER
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
mkdir -p "/var/log/$app"
|
||||||
|
chown -R "$app":"$app" "/var/log/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REINSTALL DEPENDENCIES
|
# REINSTALL DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info "Reinstalling dependencies..."
|
ynh_print_info "Reinstalling dependencies..."
|
||||||
|
|
||||||
# Define and install dependencies
|
# Define and install dependencies
|
||||||
ynh_install_app_dependencies ca-certificates
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
ynh_install_nodejs 8
|
ynh_install_nodejs 8
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -84,10 +84,9 @@ ynh_print_info "Upgrading source files..."
|
||||||
# Download, check integrity, uncompress and patch the source from app.src#
|
# Download, check integrity, uncompress and patch the source from app.src#
|
||||||
#ynh_setup_source "$final_path"
|
#ynh_setup_source "$final_path"
|
||||||
|
|
||||||
pushd $final_path
|
git clone --quiet https://github.com/gobengo/distbin "$final_path/upgrade"
|
||||||
git reset --hard
|
cp -a "$final_path/upgrade/." "$final_path/$app/."
|
||||||
git pull --quiet
|
rm -r "$final_path/upgrade"
|
||||||
popd
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
@ -102,7 +101,7 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info "Upgrading dependencies..."
|
ynh_print_info "Upgrading dependencies..."
|
||||||
|
|
||||||
ynh_install_app_dependencies ca-certificates
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
ynh_install_nodejs 8
|
ynh_install_nodejs 8
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -187,8 +186,12 @@ ynh_add_systemd_config
|
||||||
#chown -R root: $final_path
|
#chown -R root: $final_path
|
||||||
chown -R $app:$app $final_path
|
chown -R $app:$app $final_path
|
||||||
|
|
||||||
mkdir -p /var/log/$app
|
#=================================================
|
||||||
chown -R $app:$app /var/log/$app
|
# CREATE LOG FOLDER
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
mkdir -p "/var/log/$app"
|
||||||
|
chown -R "$app":"$app" "/var/log/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
|
|
Loading…
Reference in a new issue