mirror of
https://github.com/YunoHost-Apps/facette_ynh.git
synced 2024-09-03 18:36:02 +02:00
Fix
This commit is contained in:
parent
bef9ef08fc
commit
e01c1b5a99
8 changed files with 255 additions and 184 deletions
71
README.md
71
README.md
|
@ -1,18 +1,71 @@
|
||||||
# Facette app for YunoHost
|
# Facette for YunoHost
|
||||||
|
|
||||||
This app work only on x64 for the moment
|
|
||||||
|
|
||||||
- [Yunohost project](https://yunohost.org)
|
|
||||||
- [Facette app website](https://facette.io/)
|
|
||||||
|
|
||||||
|
[](https://dash.yunohost.org/appci/app/facette)  
|
||||||
[](https://install-app.yunohost.org/?app=facette)
|
[](https://install-app.yunohost.org/?app=facette)
|
||||||
|
|
||||||

|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
|
||||||
|
> *This package allows you to install Facette 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.*
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
Navidrome is an open source web-based music collection server and streamer. It gives you freedom to listen to your music collection from any browser or mobile device.
|
||||||
|
|
||||||
|
**Shipped version:** 0.37.0
|
||||||
|
|
||||||
**Upgrade this package:**
|
## Screenshots
|
||||||
`sudo yunohost app upgrade --verbose example -u https://github.com/YunoHost-Apps/facette_ynh`
|
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Demo
|
||||||
|
|
||||||
|
* [Official demo](https://demo.navidrome.org/app/#/login)
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
#### Where are stored your music files
|
||||||
|
|
||||||
|
Your music files are stored by default in your shared [multimedia folder](https://github.com/YunoHost-Apps/yunohost.multimedia) `/home/yunohost.multimedia/share/Music`. This folder is accessible from Nextcloud with *External Storages* enabled. This will allow you to easily upload your music files to the server.
|
||||||
|
|
||||||
|
You can configure an alternative path to you music files by editing the path `MusicFolder = "/home/yunohost.multimedia/share/Music"` in this file `/var/lib/navidrome/navidrome.toml` using the [documentation](https://www.navidrome.org/docs/usage/configuration-options/).
|
||||||
|
|
||||||
|
#### Client player
|
||||||
|
|
||||||
|
You must activate *public site* if you want to connect a client player to Navidrome.
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
* Official documentation: https://www.navidrome.org/docs/
|
||||||
|
* YunoHost documentation: https://yunohost.org/#/app_facette
|
||||||
|
|
||||||
|
## YunoHost specific features
|
||||||
|
|
||||||
|
#### Multi-user support
|
||||||
|
|
||||||
|
* Is LDAP supported? **No**
|
||||||
|
* Can the app be used by multiple users? **Yes**
|
||||||
|
|
||||||
|
#### Supported architectures
|
||||||
|
|
||||||
|
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/facette/)
|
||||||
|
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/facette/)
|
||||||
|
|
||||||
|
## Links
|
||||||
|
|
||||||
|
* Report a bug: https://github.com/YunoHost-Apps/facette_ynh/issues
|
||||||
|
* App website: https://facette.io/
|
||||||
|
* Upstream app repository: https://github.com/facette/facette
|
||||||
|
* YunoHost website: https://yunohost.org/
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Developer info
|
||||||
|
|
||||||
|
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/facette_ynh/tree/testing).
|
||||||
|
|
||||||
|
To try the testing branch, please proceed like that.
|
||||||
|
```
|
||||||
|
sudo yunohost app install https://github.com/YunoHost-Apps/facette_ynh/tree/testing --debug
|
||||||
|
or
|
||||||
|
sudo yunohost app upgrade facette -u https://github.com/YunoHost-Apps/facette_ynh/tree/testing --debug
|
||||||
|
```
|
||||||
|
|
|
@ -21,18 +21,8 @@
|
||||||
port_already_use=1
|
port_already_use=1
|
||||||
change_url=0
|
change_url=0
|
||||||
;;; Levels
|
;;; Levels
|
||||||
Level 1=auto
|
|
||||||
Level 2=auto
|
|
||||||
Level 3=auto
|
|
||||||
# Level 4:
|
|
||||||
Level 4=0
|
|
||||||
# Level 5:
|
# Level 5:
|
||||||
Level 5=auto
|
Level 5=auto
|
||||||
Level 6=auto
|
|
||||||
Level 7=auto
|
|
||||||
Level 8=0
|
|
||||||
Level 9=0
|
|
||||||
Level 10=0
|
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
Notification=none
|
Notification=none
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=url of app's source
|
SOURCE_URL=https://github.com/facette/facette/releases/download/0.5.1/facette_0.5.1_linux_amd64.tar.gz
|
||||||
SOURCE_SUM=sha256 checksum
|
SOURCE_SUM=152d8889da545733f25ea197208f1edd7c07cfee063b44b3ac55b61d61d361e4
|
||||||
SOURCE_SUM_PRG=sha256
|
SOURCE_SUM_PRG=sha256
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
80
conf/facette.yaml
Normal file
80
conf/facette.yaml
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
---
|
||||||
|
logger:
|
||||||
|
### File
|
||||||
|
file:
|
||||||
|
# Logging level (error, warning, notice, info or debug)
|
||||||
|
level: info
|
||||||
|
|
||||||
|
# Log file path (uses stdout if left empty or set to "-")
|
||||||
|
path:
|
||||||
|
|
||||||
|
### Syslog
|
||||||
|
#syslog:
|
||||||
|
# # Logging level (error, warning, notice, info or debug)
|
||||||
|
# level: info
|
||||||
|
|
||||||
|
# # Syslog facility name
|
||||||
|
# facility: daemon
|
||||||
|
|
||||||
|
# # Syslog tag
|
||||||
|
# tag: facette
|
||||||
|
|
||||||
|
# # Syslog address (defaults to local Syslog if left empty)
|
||||||
|
# address:
|
||||||
|
|
||||||
|
# # Network transport for Syslog instance (used if address is specified)
|
||||||
|
# transport: udp
|
||||||
|
|
||||||
|
http:
|
||||||
|
listen: localhost:12003
|
||||||
|
# or
|
||||||
|
#listen: unix:/var/run/facette.sock?mode=0644&user=facette&group=facette
|
||||||
|
|
||||||
|
# Timeout before forcefully shutdown remaining connections (in seconds)
|
||||||
|
#graceful_timeout: 30
|
||||||
|
|
||||||
|
# Root path behind which the service is located
|
||||||
|
#base_path: /
|
||||||
|
|
||||||
|
# Allow/Prevent modifications through API calls
|
||||||
|
read_only: false
|
||||||
|
|
||||||
|
# Enable and serve UI assets
|
||||||
|
enable_ui: true
|
||||||
|
|
||||||
|
# Expose/Hide version and build information via/from the API
|
||||||
|
expose_version: true
|
||||||
|
|
||||||
|
storage:
|
||||||
|
# Enable SQL storage debugging
|
||||||
|
debug: false
|
||||||
|
|
||||||
|
### SQLite
|
||||||
|
driver: sqlite
|
||||||
|
path: var/data.db
|
||||||
|
|
||||||
|
### PostgreSQL
|
||||||
|
#driver: pgsql
|
||||||
|
#host: localhost
|
||||||
|
#port: 5432
|
||||||
|
#dbname: facette
|
||||||
|
#user: facette
|
||||||
|
#password: ********
|
||||||
|
|
||||||
|
### MySQL
|
||||||
|
#driver: mysql
|
||||||
|
#host: localhost
|
||||||
|
#port: 3306
|
||||||
|
#dbname: facette
|
||||||
|
#user: facette
|
||||||
|
#password: ********
|
||||||
|
|
||||||
|
cache:
|
||||||
|
# Cache directory path
|
||||||
|
path: var/cache
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
# Default time range
|
||||||
|
time_range: -1h
|
||||||
|
|
||||||
|
# vim: ts=2 sw=2 et
|
|
@ -1,12 +1,23 @@
|
||||||
location / {
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
location __PATH__/ {
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header Host $http_host;
|
# Force usage of https
|
||||||
proxy_redirect off;
|
if ($scheme = http) {
|
||||||
proxy_pass http://127.0.0.1:12003;
|
rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Include SSOWAT user panel.
|
proxy_pass http://127.0.0.1:__PORT__;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Host $server_name;
|
||||||
|
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
||||||
|
# Include SSOWAT user panel.
|
||||||
include conf.d/yunohost_panel.conf.inc;
|
include conf.d/yunohost_panel.conf.inc;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,24 +3,23 @@
|
||||||
"id": "facette",
|
"id": "facette",
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
"description": {
|
"description": {
|
||||||
"en": "Facette package for YunoHost.",
|
"en": "Time series data visualization software.",
|
||||||
"fr": "Facette pour YunoHost."
|
"fr": "Logiciel de visualisation de données de séries chronologiques."
|
||||||
},
|
},
|
||||||
|
"version": "0.5.1~ynh1",
|
||||||
"url": "https://example.com",
|
"url": "https://example.com",
|
||||||
"license": "free",
|
"license": "BSD-3-Clause",
|
||||||
"version": "1.0",
|
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
"name": "rafi59",
|
"name": "rafi59",
|
||||||
"email": "jrafi59_dev@srvmaison.fr.nf",
|
"email": "jrafi59_dev@srvmaison.fr.nf"
|
||||||
"url": "http://example.com"
|
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 2.7.2"
|
"yunohost": ">= 4.0.0"
|
||||||
},
|
},
|
||||||
"multi_instance": false,
|
"multi_instance": false,
|
||||||
"services": [
|
"services": [
|
||||||
"nginx",
|
"nginx",
|
||||||
"php5-fpm",
|
"php7.0-fpm",
|
||||||
"mysql"
|
"mysql"
|
||||||
],
|
],
|
||||||
"arguments": {
|
"arguments": {
|
||||||
|
@ -29,8 +28,8 @@
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain",
|
"type": "domain",
|
||||||
"ask": {
|
"ask": {
|
||||||
"en": "Choose a domain name for ynhexample",
|
"en": "Choose a domain name for Facette",
|
||||||
"fr": "Choisissez un nom de domaine pour ynhexample"
|
"fr": "Choisissez un nom de domaine pour Facette"
|
||||||
},
|
},
|
||||||
"example": "example.com"
|
"example": "example.com"
|
||||||
},
|
},
|
||||||
|
@ -53,7 +52,6 @@
|
||||||
},
|
},
|
||||||
"default": true
|
"default": true
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,112 +1,47 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# =============================================================================
|
#=================================================
|
||||||
# YUNOHOST 2.7 FORTHCOMING HELPERS
|
# COMMON VARIABLES
|
||||||
# =============================================================================
|
#=================================================
|
||||||
|
|
||||||
# Create a dedicated nginx config
|
# dependencies used by the app
|
||||||
|
pkg_dependencies="rrdtool rrdcached collectd"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# PERSONAL HELPERS
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# EXPERIMENTAL HELPERS
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# FUTURE OFFICIAL HELPERS
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Check the architecture
|
||||||
#
|
#
|
||||||
# usage: ynh_add_nginx_config
|
# example: architecture=$(ynh_detect_arch)
|
||||||
ynh_add_nginx_config () {
|
|
||||||
finalnginxconf="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|
||||||
ynh_backup_if_checksum_is_different "$finalnginxconf"
|
|
||||||
sudo cp ../conf/nginx.conf "$finalnginxconf"
|
|
||||||
|
|
||||||
# To avoid a break by set -u, use a void substitution ${var:-}. If the variable is not set, it's simply set with an empty variable.
|
|
||||||
# Substitute in a nginx config file only if the variable is not empty
|
|
||||||
if test -n "${path_url:-}"; then
|
|
||||||
ynh_replace_string "__PATH__" "$path_url" "$finalnginxconf"
|
|
||||||
fi
|
|
||||||
if test -n "${domain:-}"; then
|
|
||||||
ynh_replace_string "__DOMAIN__" "$domain" "$finalnginxconf"
|
|
||||||
fi
|
|
||||||
if test -n "${port:-}"; then
|
|
||||||
ynh_replace_string "__PORT__" "$port" "$finalnginxconf"
|
|
||||||
fi
|
|
||||||
if test -n "${app:-}"; then
|
|
||||||
ynh_replace_string "__NAME__" "$app" "$finalnginxconf"
|
|
||||||
fi
|
|
||||||
if test -n "${final_path:-}"; then
|
|
||||||
ynh_replace_string "__FINALPATH__" "$final_path" "$finalnginxconf"
|
|
||||||
fi
|
|
||||||
ynh_store_file_checksum "$finalnginxconf"
|
|
||||||
|
|
||||||
sudo systemctl reload nginx
|
|
||||||
}
|
|
||||||
|
|
||||||
# Remove the dedicated nginx config
|
|
||||||
#
|
#
|
||||||
# usage: ynh_remove_nginx_config
|
# usage: ynh_detect_arch
|
||||||
ynh_remove_nginx_config () {
|
|
||||||
ynh_secure_remove "/etc/nginx/conf.d/$domain.d/$app.conf"
|
|
||||||
sudo systemctl reload nginx
|
|
||||||
}
|
|
||||||
|
|
||||||
# Create a dedicated php-fpm config
|
|
||||||
#
|
#
|
||||||
# usage: ynh_add_fpm_config
|
# Requires YunoHost version 2.2.4 or higher.
|
||||||
ynh_add_fpm_config () {
|
ynh_detect_arch(){
|
||||||
finalphpconf="/etc/php5/fpm/pool.d/$app.conf"
|
local architecture
|
||||||
ynh_backup_if_checksum_is_different "$finalphpconf"
|
if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then
|
||||||
sudo cp ../conf/php-fpm.conf "$finalphpconf"
|
architecture="arm64"
|
||||||
ynh_replace_string "__NAMETOCHANGE__" "$app" "$finalphpconf"
|
elif [ -n "$(uname -m | grep 86)" ]; then
|
||||||
ynh_replace_string "__FINALPATH__" "$final_path" "$finalphpconf"
|
architecture="i386"
|
||||||
ynh_replace_string "__USER__" "$app" "$finalphpconf"
|
elif [ -n "$(uname -m | grep 64)" ]; then
|
||||||
sudo chown root: "$finalphpconf"
|
architecture="x86-64"
|
||||||
ynh_store_file_checksum "$finalphpconf"
|
elif [ -n "$(uname -m | grep armv7)" ]; then
|
||||||
|
architecture="armv7"
|
||||||
if [ -e "../conf/php-fpm.ini" ]
|
elif [ -n "$(uname -m | grep armv6)" ]; then
|
||||||
then
|
architecture="armv6"
|
||||||
finalphpini="/etc/php5/fpm/conf.d/20-$app.ini"
|
elif [ -n "$(uname -m | grep armv5)" ]; then
|
||||||
ynh_backup_if_checksum_is_different "$finalphpini"
|
architecture="armv5"
|
||||||
sudo cp ../conf/php-fpm.ini "$finalphpini"
|
else
|
||||||
sudo chown root: "$finalphpini"
|
architecture="unknown"
|
||||||
ynh_store_file_checksum "$finalphpini"
|
fi
|
||||||
fi
|
echo $architecture
|
||||||
|
|
||||||
sudo systemctl reload php5-fpm
|
|
||||||
}
|
|
||||||
|
|
||||||
# Remove the dedicated php-fpm config
|
|
||||||
#
|
|
||||||
# usage: ynh_remove_fpm_config
|
|
||||||
ynh_remove_fpm_config () {
|
|
||||||
ynh_secure_remove "/etc/php5/fpm/pool.d/$app.conf"
|
|
||||||
ynh_secure_remove "/etc/php5/fpm/conf.d/20-$app.ini" 2>&1
|
|
||||||
sudo systemctl reload php5-fpm
|
|
||||||
}
|
|
||||||
|
|
||||||
# Create a dedicated systemd config
|
|
||||||
#
|
|
||||||
# usage: ynh_add_systemd_config
|
|
||||||
ynh_add_systemd_config () {
|
|
||||||
finalsystemdconf="/etc/systemd/system/$app.service"
|
|
||||||
ynh_backup_if_checksum_is_different "$finalsystemdconf"
|
|
||||||
sudo cp ../conf/systemd.service "$finalsystemdconf"
|
|
||||||
|
|
||||||
# To avoid a break by set -u, use a void substitution ${var:-}. If the variable is not set, it's simply set with an empty variable.
|
|
||||||
# Substitute in a nginx config file only if the variable is not empty
|
|
||||||
if test -n "${final_path:-}"; then
|
|
||||||
ynh_replace_string "__FINALPATH__" "$final_path" "$finalsystemdconf"
|
|
||||||
fi
|
|
||||||
if test -n "${app:-}"; then
|
|
||||||
ynh_replace_string "__APP__" "$app" "$finalsystemdconf"
|
|
||||||
fi
|
|
||||||
ynh_store_file_checksum "$finalsystemdconf"
|
|
||||||
|
|
||||||
sudo chown root: "$finalsystemdconf"
|
|
||||||
sudo systemctl enable $app
|
|
||||||
sudo systemctl daemon-reload
|
|
||||||
}
|
|
||||||
|
|
||||||
# Remove the dedicated systemd config
|
|
||||||
#
|
|
||||||
# usage: ynh_remove_systemd_config
|
|
||||||
ynh_remove_systemd_config () {
|
|
||||||
finalsystemdconf="/etc/systemd/system/$app.service"
|
|
||||||
if [ -e "$finalsystemdconf" ]; then
|
|
||||||
sudo systemctl stop $app
|
|
||||||
sudo systemctl disable $app
|
|
||||||
ynh_secure_remove "$finalsystemdconf"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@ source /usr/share/yunohost/helpers
|
||||||
# MANAGE SCRIPT FAILURE
|
# MANAGE SCRIPT FAILURE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Exit if an error occurs during the execution of the script
|
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -24,57 +23,56 @@ domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url=$YNH_APP_ARG_PATH
|
path_url=$YNH_APP_ARG_PATH
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
|
|
||||||
|
|
||||||
# This is a multi-instance app, meaning it can be installed several times independently
|
|
||||||
# The id of the app as stated in the manifest is available as $YNH_APP_ID
|
|
||||||
# The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2", ...)
|
|
||||||
# The app instance name is available as $YNH_APP_INSTANCE_NAME
|
|
||||||
# - the first time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample
|
|
||||||
# - the second time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample__2
|
|
||||||
# - ynhexample__{N} for the subsequent installations, with N=3,4, ...
|
|
||||||
# The app instance name is probably what you are interested the most, since this is
|
|
||||||
# guaranteed to be unique. This is a good unique identifier to define installation path,
|
|
||||||
# db names, ...
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Validating installation parameters..." --weight=1
|
||||||
# Normalize the url path syntax
|
|
||||||
path_url=$(ynh_normalize_url_path $path_url)
|
|
||||||
|
|
||||||
# Check web path availability
|
|
||||||
ynh_webpath_available $domain $path_url
|
|
||||||
# Register (book) web path
|
|
||||||
ynh_webpath_register $app $domain $path_url
|
|
||||||
|
|
||||||
final_path=/var/www/$app
|
final_path=/var/www/$app
|
||||||
test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||||
|
|
||||||
|
# Register (book) web path
|
||||||
|
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE SETTINGS FROM MANIFEST
|
# STORE SETTINGS FROM MANIFEST
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Storing installation settings..." --weight=2
|
||||||
|
|
||||||
ynh_app_setting_set $app domain $domain
|
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||||
ynh_app_setting_set $app path $path_url
|
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||||
ynh_app_setting_set $app is_public $is_public
|
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# STANDARD MODIFICATIONS
|
||||||
|
#=================================================
|
||||||
|
# FIND AND OPEN A PORT
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring firewall..." --weight=0
|
||||||
|
|
||||||
|
# Find an available port
|
||||||
|
port=$(ynh_find_port --port=12003)
|
||||||
|
ynh_app_setting_set --app=$app --key=port --value=$port
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL DEPENDENCIES
|
# INSTALL DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Installing dependencies..." --weight=9
|
||||||
|
|
||||||
ynh_install_app_dependencies rrdtool rrdcached collectd
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Setting up source files..." --weight=4
|
||||||
|
|
||||||
|
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
|
|
||||||
ynh_app_setting_set $app final_path $final_path
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
wget https://github.com/facette/facette/releases/download/0.4.0rc2/facette_0.4.0rc2_jessie-amd64.deb
|
ynh_setup_source --dest_dir=$final_path
|
||||||
dpkg -i facette_0.4.0rc2_jessie-amd64.deb
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
@ -120,21 +118,27 @@ yunohost service add NAME_INIT.D --log "/var/log/FILE.log"
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring SSOwat..." --weight=1
|
||||||
|
|
||||||
if [ $is_public -eq 0 ]
|
# Make app public if necessary or protect it
|
||||||
then # Remove the public access
|
|
||||||
ynh_app_setting_delete $app skipped_uris
|
|
||||||
fi
|
|
||||||
# Make app public if necessary
|
|
||||||
if [ $is_public -eq 1 ]
|
if [ $is_public -eq 1 ]
|
||||||
then
|
then
|
||||||
# unprotected_uris allows SSO credentials to be passed anyway.
|
ynh_permission_update --permission "main" --add "visitors"
|
||||||
ynh_app_setting_set $app unprotected_uris "/"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Reloading NGINX web server..." --weight=2
|
||||||
|
|
||||||
systemctl reload nginx
|
|
||||||
systemctl restart rrdcached
|
systemctl restart rrdcached
|
||||||
|
|
||||||
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# END OF SCRIPT
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_script_progression --message="Installation of Navidrome completed" --last
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue