mirror of
https://github.com/YunoHost-Apps/synapse-admin_ynh.git
synced 2024-09-03 20:26:34 +02:00
commit
a4472766b7
16 changed files with 163 additions and 175 deletions
35
issue_template.md → .github/ISSUE_TEMPLATE.md
vendored
35
issue_template.md → .github/ISSUE_TEMPLATE.md
vendored
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
name: Bug report
|
name: Bug report
|
||||||
about: Create a report to help us debug, it would be nice to fill the template as much as you can to help us, help you and help us all.
|
about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -8,28 +8,30 @@ about: Create a report to help us debug, it would be nice to fill the template a
|
||||||
1. *Read this whole template first.*
|
1. *Read this whole template first.*
|
||||||
2. *Determine if you are on the right place:*
|
2. *Determine if you are on the right place:*
|
||||||
- *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!*
|
- *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!*
|
||||||
- *Otherwise, the issue may be due to Synapse Admin itself. Refer to its documentation or repository for help.*
|
- *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.*
|
||||||
- *If you have a doubt, post here, we will figure it out together.*
|
- *When in doubt, post here and we will figure it out together.*
|
||||||
3. *Delete the italic comments as you write over them below, and remove this guide.*
|
3. *Delete the italic comments as you write over them below, and remove this guide.*
|
||||||
---
|
---
|
||||||
|
|
||||||
**Describe the bug**
|
### Describe the bug
|
||||||
|
|
||||||
*A clear and concise description of what the bug is.*
|
*A clear and concise description of what the bug is.*
|
||||||
|
|
||||||
**Versions**
|
### Context
|
||||||
|
|
||||||
- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...*
|
- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...*
|
||||||
- YunoHost version: x.x.x
|
- YunoHost version: x.x.x
|
||||||
- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...*
|
- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...*
|
||||||
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?: *no / yes*
|
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes*
|
||||||
- If yes, please explain:
|
- If yes, please explain:
|
||||||
- Using, or trying to install package version/branch:
|
- Using, or trying to install package version/branch:
|
||||||
- If upgrading, current package version: *can be found in the admin, or with `yunohost app info synapse-admin`*
|
- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`*
|
||||||
|
|
||||||
|
### Steps to reproduce
|
||||||
|
|
||||||
**To Reproduce**
|
|
||||||
*Steps to reproduce the behavior.*
|
|
||||||
- *If you performed a command from the CLI, the command itself is enough. For example:*
|
- *If you performed a command from the CLI, the command itself is enough. For example:*
|
||||||
```sh
|
```sh
|
||||||
sudo yunohost app install synapse-admin
|
sudo yunohost app install the_app
|
||||||
```
|
```
|
||||||
- *If you used the webadmin, please perform the equivalent command from the CLI first.*
|
- *If you used the webadmin, please perform the equivalent command from the CLI first.*
|
||||||
- *If the error occurs in your browser, explain what you did:*
|
- *If the error occurs in your browser, explain what you did:*
|
||||||
|
@ -38,9 +40,16 @@ about: Create a report to help us debug, it would be nice to fill the template a
|
||||||
3. *Scroll down to '...'*
|
3. *Scroll down to '...'*
|
||||||
4. *See error*
|
4. *See error*
|
||||||
|
|
||||||
**Expected behavior**
|
### Expected behavior
|
||||||
|
|
||||||
*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.*
|
*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.*
|
||||||
|
|
||||||
**Logs**
|
### Logs
|
||||||
*After a failed command, YunoHost makes the log available to you, but also to others, thanks to `yunohost log display [log name] --share`. The actual command, with the correct log name, is displayed at the end of the failed attempt in the CLI. Execute it and copy here the share link it outputs.*
|
|
||||||
|
*When an operation fails, YunoHost provides a simple way to share the logs.*
|
||||||
|
- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.*
|
||||||
|
- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.*
|
||||||
|
|
||||||
|
*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)*
|
||||||
|
|
||||||
*If applicable and useful, add screenshots to help explain your problem.*
|
*If applicable and useful, add screenshots to help explain your problem.*
|
16
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
16
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
## Problem
|
||||||
|
|
||||||
|
- *Description of why you made this PR*
|
||||||
|
|
||||||
|
## Solution
|
||||||
|
|
||||||
|
- *And how do you fix that problem*
|
||||||
|
|
||||||
|
## PR Status
|
||||||
|
|
||||||
|
- [ ] Code finished and ready to be reviewed/tested
|
||||||
|
- [ ] The fix/enhancement were manually tested (if applicable)
|
||||||
|
|
||||||
|
## Automatic tests
|
||||||
|
|
||||||
|
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)
|
49
README.md
49
README.md
|
@ -1,3 +1,8 @@
|
||||||
|
<!--
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
|
||||||
# Synapse Admin for YunoHost
|
# Synapse Admin for YunoHost
|
||||||
|
|
||||||
[![Integration level](https://dash.yunohost.org/integration/synapse-admin.svg)](https://dash.yunohost.org/appci/app/synapse-admin) ![](https://ci-apps.yunohost.org/ci/badges/synapse-admin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/synapse-admin.maintain.svg)
|
[![Integration level](https://dash.yunohost.org/integration/synapse-admin.svg)](https://dash.yunohost.org/appci/app/synapse-admin) ![](https://ci-apps.yunohost.org/ci/badges/synapse-admin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/synapse-admin.maintain.svg)
|
||||||
|
@ -5,43 +10,27 @@
|
||||||
|
|
||||||
*[Lire ce readme en français.](./README_fr.md)*
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
|
||||||
> *This package allows you to install Synapse Admin quickly and simply on a YunoHost server.
|
> *This package allows you to install Synapse Admin 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.*
|
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
**Shipped version:** 0.8.0
|
Admin UI for Synapse
|
||||||
|
|
||||||
|
**Shipped version:** 0.8.1~ynh1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
![](https://raw.githubusercontent.com/Awesome-Technologies/synapse-admin/master/screenshots.jpg)
|
![](./doc/screenshots/screenshots.jpg)
|
||||||
|
|
||||||
## Configuration
|
## Documentation and resources
|
||||||
|
|
||||||
## Documentation
|
* Official app website: https://github.com/Awesome-Technologies/synapse-admin
|
||||||
|
* Upstream app code repository: https://github.com/Awesome-Technologies/synapse-admin
|
||||||
* Official documentation:
|
* YunoHost documentation for this app: https://yunohost.org/app_synapse-admin
|
||||||
* YunoHost documentation: https://yunohost.org/en/app_synapse-admin
|
* Report a bug: https://github.com/YunoHost-Apps/synapse-admin_ynh/issues
|
||||||
|
|
||||||
## YunoHost specific features
|
|
||||||
|
|
||||||
#### Multi-user support
|
|
||||||
|
|
||||||
* Is LDAP supported? **NO**
|
|
||||||
* Can the app be used by multiple users? **NO**
|
|
||||||
|
|
||||||
#### Supported architectures
|
|
||||||
|
|
||||||
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/synapse-admin.svg)](https://ci-apps.yunohost.org/ci/apps/synapse-admin/)
|
|
||||||
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/synapse-admin.svg)](https://ci-apps-arm.yunohost.org/ci/apps/synapse-admin/)
|
|
||||||
|
|
||||||
## Links
|
|
||||||
|
|
||||||
* Report a bug: https://github.com/YunoHost-Apps/synapse-admin_ynh/issues
|
|
||||||
* Upstream app repository: https://github.com/Awesome-Technologies/synapse-admin
|
|
||||||
* YunoHost website: https://yunohost.org/
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Developer info
|
## Developer info
|
||||||
|
|
||||||
|
@ -53,3 +42,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/synapse-admin_ynh/tre
|
||||||
or
|
or
|
||||||
sudo yunohost app upgrade synapse-admin -u https://github.com/YunoHost-Apps/synapse-admin_ynh/tree/testing --debug
|
sudo yunohost app upgrade synapse-admin -u https://github.com/YunoHost-Apps/synapse-admin_ynh/tree/testing --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**More info regarding app packaging:** https://yunohost.org/packaging_apps
|
46
README_fr.md
46
README_fr.md
|
@ -3,46 +3,30 @@
|
||||||
[![Niveau d'intégration](https://dash.yunohost.org/integration/synapse-admin.svg)](https://dash.yunohost.org/appci/app/synapse-admin) ![](https://ci-apps.yunohost.org/ci/badges/synapse-admin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/synapse-admin.maintain.svg)
|
[![Niveau d'intégration](https://dash.yunohost.org/integration/synapse-admin.svg)](https://dash.yunohost.org/appci/app/synapse-admin) ![](https://ci-apps.yunohost.org/ci/badges/synapse-admin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/synapse-admin.maintain.svg)
|
||||||
[![Installer Synapse Admin avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=synapse-admin)
|
[![Installer Synapse Admin avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=synapse-admin)
|
||||||
|
|
||||||
*[Read this readme in english.](./README.md)*
|
*[Read this readme in english.](./README.md)*
|
||||||
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
|
||||||
> *Ce package vous permet d'installer Synapse Admin rapidement et simplement sur un serveur YunoHost.
|
> *Ce package vous permet d'installer Synapse Admin rapidement et simplement sur un serveur YunoHost.
|
||||||
Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/install) pour apprendre comment l'installer.*
|
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
||||||
|
|
||||||
## Vue d'ensemble
|
## Vue d'ensemble
|
||||||
|
|
||||||
|
Admin UI pour Synapse
|
||||||
|
|
||||||
|
**Version incluse :** 0.8.1~ynh1
|
||||||
|
|
||||||
|
|
||||||
**Version incluse :** 0.8.0
|
|
||||||
|
|
||||||
## Captures d'écran
|
## Captures d'écran
|
||||||
|
|
||||||
![](https://raw.githubusercontent.com/Awesome-Technologies/synapse-admin/master/screenshots.jpg)
|
![](./doc/screenshots/screenshots.jpg)
|
||||||
|
|
||||||
## Configuration
|
## Documentations et ressources
|
||||||
|
|
||||||
## Documentation
|
* Site officiel de l'app : https://github.com/Awesome-Technologies/synapse-admin
|
||||||
|
* Dépôt de code officiel de l'app : https://github.com/Awesome-Technologies/synapse-admin
|
||||||
* Documentation officielle :
|
* Documentation YunoHost pour cette app : https://yunohost.org/app_synapse-admin
|
||||||
* Documentation YunoHost : https://yunohost.org/fr/app_synapse-admin
|
* Signaler un bug : https://github.com/YunoHost-Apps/synapse-admin_ynh/issues
|
||||||
|
|
||||||
## Caractéristiques spécifiques YunoHost
|
|
||||||
|
|
||||||
#### Support multi-utilisateur
|
|
||||||
|
|
||||||
* L'authentification LDAP est-elle prise en charge ? **Non**
|
|
||||||
* L'application peut-elle être utilisée par plusieurs utilisateurs ? **Non**
|
|
||||||
|
|
||||||
#### Architectures supportées
|
|
||||||
|
|
||||||
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/synapse-admin.svg)](https://ci-apps.yunohost.org/ci/apps/synapse-admin/)
|
|
||||||
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/synapse-admin.svg)](https://ci-apps-arm.yunohost.org/ci/apps/synapse-admin/)
|
|
||||||
|
|
||||||
## Liens
|
|
||||||
|
|
||||||
* Signaler un bug : https://github.com/YunoHost-Apps/synapse-admin_ynh/issues
|
|
||||||
* Dépôt de l'application principale : https://github.com/Awesome-Technologies/synapse-admin
|
|
||||||
* Site web YunoHost : https://yunohost.org/
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Informations pour les développeurs
|
## Informations pour les développeurs
|
||||||
|
|
||||||
|
@ -54,3 +38,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/synapse-admin_ynh/tre
|
||||||
ou
|
ou
|
||||||
sudo yunohost app upgrade synapse-admin -u https://github.com/YunoHost-Apps/synapse-admin_ynh/tree/testing --debug
|
sudo yunohost app upgrade synapse-admin -u https://github.com/YunoHost-Apps/synapse-admin_ynh/tree/testing --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps
|
|
@ -13,7 +13,7 @@
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=0
|
||||||
change_url=1
|
change_url=1
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
|
|
|
@ -2,4 +2,7 @@
|
||||||
# If you set this setting, the user will not be able to select
|
# If you set this setting, the user will not be able to select
|
||||||
# the server and have to use synapse-admin with this server.
|
# the server and have to use synapse-admin with this server.
|
||||||
|
|
||||||
REACT_APP_SERVER=https://__SYNAPSE_DOMAIN__
|
#REACT_APP_SERVER=https://
|
||||||
|
|
||||||
|
#Define the port to avoid collisions on port 3000
|
||||||
|
PORT=__PORT__
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/Awesome-Technologies/synapse-admin/archive/0.8.0.tar.gz
|
SOURCE_URL=https://github.com/Awesome-Technologies/synapse-admin/archive/refs/tags/0.8.1.tar.gz
|
||||||
SOURCE_SUM=33b1519c3b6631dac55228ca2cd126ab277d53d27eff8310170ed2343b7ca662
|
SOURCE_SUM=a939bc4f98246eac7c8cfb42f936129697bae2e9547541bcf6b4aafa816d6613
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
BIN
doc/screenshots/screenshots.jpg
Normal file
BIN
doc/screenshots/screenshots.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 222 KiB |
|
@ -3,11 +3,16 @@
|
||||||
"id": "synapse-admin",
|
"id": "synapse-admin",
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
"description": {
|
"description": {
|
||||||
"en": "Admin ui for Synapse",
|
"en": "Admin UI for Synapse",
|
||||||
"fr": "Admin ui pour Synapse"
|
"fr": "Admin UI pour Synapse"
|
||||||
},
|
},
|
||||||
"version": "0.8.0~ynh1",
|
"version": "0.8.1~ynh1",
|
||||||
"url": "https://github.com/Awesome-Technologies/synapse-admin",
|
"url": "https://github.com/Awesome-Technologies/synapse-admin",
|
||||||
|
"upstream": {
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"website": "https://github.com/Awesome-Technologies/synapse-admin",
|
||||||
|
"code": "https://github.com/Awesome-Technologies/synapse-admin"
|
||||||
|
},
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
"name": ""
|
"name": ""
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
## 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.
|
|
||||||
|
|
||||||
## Package_check results
|
|
||||||
---
|
|
||||||
* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"*
|
|
|
@ -4,8 +4,7 @@
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# dependencies used by the app
|
version_commit="40d0813898bccb30f00e585718176be8e4821bbe"
|
||||||
pkg_dependencies=""
|
|
||||||
|
|
||||||
nodejs_version=12
|
nodejs_version=12
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,6 @@ ynh_backup --src_path="$final_path"
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC BACKUP
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP SYSTEMD
|
# BACKUP SYSTEMD
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -23,7 +23,7 @@ ynh_abort_if_errors
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url="/"
|
path_url="/"
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
synapse_domain=$(yunohost app setting synapse domain)
|
#synapse_domain=$(yunohost app setting synapse domain)
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -61,33 +61,12 @@ ynh_app_setting_set --app=$app --key=port --value=$port
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing dependencies..." --weight=20
|
ynh_script_progression --message="Installing dependencies..." --weight=20
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
|
||||||
|
|
||||||
# Install Nodejs
|
# Install Nodejs
|
||||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
|
|
||||||
# Install Yarn
|
# Install Yarn
|
||||||
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
|
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Setting up source files..." --weight=2
|
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
|
||||||
#ynh_setup_source --dest_dir=$final_path
|
|
||||||
|
|
||||||
git clone https://github.com/Awesome-Technologies/synapse-admin.git "$final_path" --quiet
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# NGINX CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
|
||||||
ynh_add_nginx_config
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -96,17 +75,53 @@ ynh_script_progression --message="Configuring system user..." --weight=3
|
||||||
# Create a system user
|
# Create a system user
|
||||||
ynh_system_user_create --username=$app --home_dir=$final_path
|
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Setting up source files..." --weight=2
|
||||||
|
|
||||||
|
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
|
#ynh_setup_source --dest_dir=$final_path
|
||||||
|
|
||||||
|
git clone --quiet https://github.com/Awesome-Technologies/synapse-admin.git -b master "$final_path"
|
||||||
|
# Reset branch to the level of update we needed
|
||||||
|
pushd "$final_path"
|
||||||
|
git reset --hard --quiet $version_commit
|
||||||
|
popd
|
||||||
|
|
||||||
|
chmod 750 "$final_path"
|
||||||
|
chmod -R o-rwx "$final_path"
|
||||||
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# NGINX CONFIGURATION
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
||||||
|
|
||||||
|
# Create a dedicated NGINX config
|
||||||
|
ynh_add_nginx_config
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# ADD A CONFIGURATION
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||||
|
|
||||||
|
ynh_add_config --template="../conf/.env" --destination="$final_path/.env"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC SETUP
|
# SPECIFIC SETUP
|
||||||
#==============================================
|
#==============================================
|
||||||
# INSTALL CODIMD
|
# INSTALL SYNAPSE-ADMIN
|
||||||
#==============================================
|
#==============================================
|
||||||
ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=40
|
ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=40
|
||||||
|
|
||||||
pushd "$final_path" || ynh_die
|
pushd "$final_path"
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
ynh_exec_warn_less yarn install
|
ynh_exec_warn_less yarn install
|
||||||
popd || ynh_die
|
popd
|
||||||
|
|
||||||
|
chown -R $app: $final_path
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
|
@ -132,7 +147,7 @@ ynh_add_config --template="../conf/.env" --destination="$final_path/.env"
|
||||||
ynh_script_progression --message="Securing files and directories..."
|
ynh_script_progression --message="Securing files and directories..."
|
||||||
|
|
||||||
# Set permissions to app files
|
# Set permissions to app files
|
||||||
chown -R $app:$app $final_path
|
chown -R $app: $final_path
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INTEGRATE SERVICE IN YUNOHOST
|
# INTEGRATE SERVICE IN YUNOHOST
|
||||||
|
|
|
@ -47,8 +47,6 @@ ynh_remove_systemd_config
|
||||||
ynh_script_progression --message="Removing dependencies..." --weight=1
|
ynh_script_progression --message="Removing dependencies..." --weight=1
|
||||||
|
|
||||||
# Remove metapackage and its dependencies
|
# Remove metapackage and its dependencies
|
||||||
ynh_remove_app_dependencies
|
|
||||||
|
|
||||||
ynh_remove_nodejs
|
ynh_remove_nodejs
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -46,6 +46,14 @@ ynh_script_progression --message="Restoring the NGINX configuration..."
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# RECREATE THE DEDICATED USER
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
|
||||||
|
|
||||||
|
# Create the dedicated user (if not existing)
|
||||||
|
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE APP MAIN DIR
|
# RESTORE THE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -53,21 +61,9 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
||||||
|
|
||||||
ynh_restore_file --origin_path="$final_path"
|
ynh_restore_file --origin_path="$final_path"
|
||||||
|
|
||||||
#=================================================
|
chmod 750 "$final_path"
|
||||||
# RECREATE THE DEDICATED USER
|
chmod -R o-rwx "$final_path"
|
||||||
#=================================================
|
chown -R $app:www-data "$final_path"
|
||||||
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
|
|
||||||
|
|
||||||
# Create the dedicated user (if not existing)
|
|
||||||
ynh_system_user_create --username=$app
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RESTORE USER RIGHTS
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Restoring user rights..."
|
|
||||||
|
|
||||||
# Restore permissions on app files
|
|
||||||
chown -R $app:$app $final_path
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC RESTORATION
|
# SPECIFIC RESTORATION
|
||||||
|
@ -76,9 +72,6 @@ chown -R $app:$app $final_path
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reinstalling dependencies..." --weight=7
|
ynh_script_progression --message="Reinstalling dependencies..." --weight=7
|
||||||
|
|
||||||
# Define and install dependencies
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
|
||||||
|
|
||||||
# Install Nodejs
|
# Install Nodejs
|
||||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
|
|
||||||
|
@ -105,7 +98,7 @@ yunohost service add $app --description "UI admin for Synapse" --log="/var/log/$
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="HTTP Server listening"
|
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #--line_match="HTTP Server listening"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
|
|
@ -63,6 +63,14 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# CREATE DEDICATED USER
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring system user..." --weight=1
|
||||||
|
|
||||||
|
# Create a system user
|
||||||
|
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -71,13 +79,18 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=160
|
ynh_script_progression --message="Upgrading source files..." --weight=160
|
||||||
|
|
||||||
# Remove the app directory securely
|
pushd "$final_path"
|
||||||
ynh_secure_remove --file=$final_path
|
git fetch --quiet
|
||||||
|
git checkout master --quiet
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
git pull --quiet
|
||||||
ynh_setup_source --dest_dir=$final_path
|
git reset --hard $version_commit --quiet
|
||||||
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
chmod 750 "$final_path"
|
||||||
|
chmod -R o-rwx "$final_path"
|
||||||
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -91,22 +104,12 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading dependencies..." --weight=18
|
ynh_script_progression --message="Upgrading dependencies..." --weight=18
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
|
||||||
|
|
||||||
# Install Nodejs
|
# Install Nodejs
|
||||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
|
|
||||||
# Install Yarn
|
# Install Yarn
|
||||||
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
|
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CREATE DEDICATED USER
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
|
|
||||||
|
|
||||||
# Create a dedicated user (if not existing)
|
|
||||||
ynh_system_user_create --username=$app
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC UPGRADE
|
# SPECIFIC UPGRADE
|
||||||
#==============================================
|
#==============================================
|
||||||
|
@ -116,10 +119,10 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=60
|
ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=60
|
||||||
|
|
||||||
pushd "$final_path" || ynh_die
|
pushd "$final_path"
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
ynh_exec_warn_less yarn install
|
ynh_exec_warn_less yarn install
|
||||||
popd || ynh_die
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -128,22 +131,10 @@ fi
|
||||||
ynh_script_progression --message="Configuring a systemd service..." --weight=2
|
ynh_script_progression --message="Configuring a systemd service..." --weight=2
|
||||||
|
|
||||||
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
|
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
|
||||||
ynh_replace_string --match_string="__YNH_NPM__" --replace_string="$ynh_npm" --target_file="../conf/systemd.service"
|
|
||||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/systemd.service"
|
|
||||||
|
|
||||||
# Create a dedicated systemd config
|
# Create a dedicated systemd config
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC FINALIZATION
|
|
||||||
#=================================================
|
|
||||||
# SECURE FILES AND DIRECTORIES
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Securing files and directories..."
|
|
||||||
|
|
||||||
# Set permissions on app files
|
|
||||||
chown -R $app:$app $final_path
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INTEGRATE SERVICE IN YUNOHOST
|
# INTEGRATE SERVICE IN YUNOHOST
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue