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
|
* it is recommended that you configure these fields to match the
|
||||||
* domain which will serve your cryptpad instance.
|
* domain which will serve your cryptpad instance.
|
||||||
*/
|
*/
|
||||||
"connect-src 'self' ws://__URL__cryptpad_websocket ws://*",
|
"connect-src 'self' ws://* wss://*",
|
||||||
"child-src 'self' *",
|
"child-src 'self' *",
|
||||||
|
|
||||||
// data: is used by codemirror
|
// data: is used by codemirror
|
||||||
|
@ -51,7 +51,7 @@ module.exports = {
|
||||||
* configured for best effect.
|
* configured for best effect.
|
||||||
*/
|
*/
|
||||||
"child-src 'self' *",
|
"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
|
// (insecure remote) images are included by users of the wysiwyg who embed photos in their pads
|
||||||
"img-src *",
|
"img-src *",
|
||||||
|
|
|
@ -5,11 +5,13 @@ After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=root
|
User=__APP__
|
||||||
|
Group=__APP__
|
||||||
|
ExecStartPre=__NODEJS__
|
||||||
WorkingDirectory=__FINALPATH__
|
WorkingDirectory=__FINALPATH__
|
||||||
|
Environment="PATH=__ENV_PATH__"
|
||||||
ExecStart=__NODE__ server.js
|
ExecStart=__NODE__ server.js
|
||||||
Restart=always
|
Restart=always
|
||||||
Environment=USER=__APP__ HOME=__FINALPATH__
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
# COMMON VARIABLES
|
# 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 domain "$domain"
|
||||||
ynh_app_setting_set $app is_public "$is_public"
|
ynh_app_setting_set $app is_public "$is_public"
|
||||||
ynh_app_setting_set $app path_url "$path_url"
|
ynh_app_setting_set $app path_url "$path_url"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -68,6 +69,7 @@ ynh_app_setting_set $app port $port
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL NODEJS
|
# INSTALL NODEJS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_install_nodejs $NODEJS_VERSION
|
ynh_install_nodejs $NODEJS_VERSION
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -114,11 +116,19 @@ sudo chmod 755 $final_path -R
|
||||||
|
|
||||||
ynh_nginx_config
|
ynh_nginx_config
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# NODEJS Version
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_use_nodejs
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADD SYSTEMD SERVICE
|
# ADD SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_replace_string "__NODE__" "$nodejs_path" "../conf/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
|
ynh_systemd_config
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ ynh_system_user_create $app
|
||||||
# HANDLE LOG FILES AND LOGROTATE
|
# HANDLE LOG FILES AND LOGROTATE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Créer le dossier de log
|
# Créer le dossier de log
|
||||||
sudo mkdir -p /var/log/$app
|
sudo mkdir -p /var/log/$app
|
||||||
sudo touch /var/log/$app/$app.log
|
sudo touch /var/log/$app/$app.log
|
||||||
install_log=/var/log/$app/installation.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 "__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
|
ynh_systemd_config
|
||||||
|
|
||||||
|
|
||||||
|
@ -153,4 +155,4 @@ fi
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
sudo systemctl restart php5-fpm
|
sudo systemctl restart php5-fpm
|
||||||
sudo systemctl reload nginx
|
sudo systemctl reload nginx
|
||||||
|
|
Loading…
Reference in a new issue