mirror of
https://github.com/YunoHost-Apps/cryptpad_ynh.git
synced 2024-09-03 18:26:14 +02:00
wss correction ! (#7) (Thanks JimboJoe)
* wss correction ! * Update systemd.service * [Fix] system.service * [Fix] Systemd.service * [Fix] path ! * Update upgrade * Update install * Update systemd.service * Update systemd.service * Update install * Update systemd.service * Update install * Update config.js * [Fix] Version 8.2.1
This commit is contained in:
parent
eb2883f949
commit
c73768d3ea
5 changed files with 21 additions and 7 deletions
|
@ -32,7 +32,7 @@ module.exports = {
|
|||
* it is recommended that you configure these fields to match the
|
||||
* domain which will serve your cryptpad instance.
|
||||
*/
|
||||
"connect-src 'self' ws://__URL__cryptpad_websocket ws://*",
|
||||
"connect-src 'self' ws://* wss://*",
|
||||
"child-src 'self' *",
|
||||
|
||||
// data: is used by codemirror
|
||||
|
@ -51,7 +51,7 @@ module.exports = {
|
|||
* configured for best effect.
|
||||
*/
|
||||
"child-src 'self' *",
|
||||
"connect-src 'self' ws://*",
|
||||
"connect-src 'self' ws://* wss://*",
|
||||
|
||||
// (insecure remote) images are included by users of the wysiwyg who embed photos in their pads
|
||||
"img-src *",
|
||||
|
|
|
@ -5,11 +5,13 @@ After=network.target
|
|||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
User=__APP__
|
||||
Group=__APP__
|
||||
ExecStartPre=__NODEJS__
|
||||
WorkingDirectory=__FINALPATH__
|
||||
Environment="PATH=__ENV_PATH__"
|
||||
ExecStart=__NODE__ server.js
|
||||
Restart=always
|
||||
Environment=USER=__APP__ HOME=__FINALPATH__
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#=================================================
|
||||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
NODEJS_VERSION="8.0.0"
|
||||
NODEJS_VERSION="8.2.1"
|
||||
|
||||
#=================================================
|
||||
#=================================================
|
||||
|
|
|
@ -56,6 +56,7 @@ CHECK_FINALPATH # Vérifie que le dossier de destination n'est pas déjà utilis
|
|||
ynh_app_setting_set $app domain "$domain"
|
||||
ynh_app_setting_set $app is_public "$is_public"
|
||||
ynh_app_setting_set $app path_url "$path_url"
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
#=================================================
|
||||
|
@ -68,6 +69,7 @@ ynh_app_setting_set $app port $port
|
|||
#=================================================
|
||||
# INSTALL NODEJS
|
||||
#=================================================
|
||||
|
||||
ynh_install_nodejs $NODEJS_VERSION
|
||||
|
||||
#=================================================
|
||||
|
@ -114,11 +116,19 @@ sudo chmod 755 $final_path -R
|
|||
|
||||
ynh_nginx_config
|
||||
|
||||
#=================================================
|
||||
# NODEJS Version
|
||||
#=================================================
|
||||
|
||||
ynh_use_nodejs
|
||||
|
||||
#=================================================
|
||||
# ADD SYSTEMD SERVICE
|
||||
#=================================================
|
||||
|
||||
ynh_replace_string "__NODE__" "$nodejs_path" "../conf/systemd.service"
|
||||
ynh_replace_string "__NODEJS__" "$nodejs_use_version" "../conf/systemd.service"
|
||||
ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service"
|
||||
ynh_systemd_config
|
||||
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ ynh_system_user_create $app
|
|||
# HANDLE LOG FILES AND LOGROTATE
|
||||
#=================================================
|
||||
|
||||
# Créer le dossier de log
|
||||
# Créer le dossier de log
|
||||
sudo mkdir -p /var/log/$app
|
||||
sudo touch /var/log/$app/$app.log
|
||||
install_log=/var/log/$app/installation.log
|
||||
|
@ -98,6 +98,8 @@ ynh_nginx_config
|
|||
#=================================================
|
||||
|
||||
ynh_replace_string "__NODE__" "$nodejs_path" "../conf/systemd.service"
|
||||
ynh_replace_string "__NODEJS__" "$nodejs_use_version" "../conf/systemd.service"
|
||||
ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service"
|
||||
ynh_systemd_config
|
||||
|
||||
|
||||
|
@ -153,4 +155,4 @@ fi
|
|||
# RELOAD NGINX
|
||||
#=================================================
|
||||
sudo systemctl restart php5-fpm
|
||||
sudo systemctl reload nginx
|
||||
sudo systemctl reload nginx
|
||||
|
|
Loading…
Reference in a new issue