1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/collabora_ynh.git synced 2024-09-03 18:16:25 +02:00

Merge pull request #3 from frju365/master

[Fix] Problem Command not found
This commit is contained in:
Rafi59 2017-08-25 21:52:48 +02:00 committed by GitHub
commit 647fbd7819
2 changed files with 11 additions and 10 deletions

View file

@ -1,7 +1,7 @@
#!/bin/bash
# =============================================================================
# YUNOHOST 2.6 FORTHCOMING HELPERS
# YUNOHOST 2.7 FORTHCOMING HELPERS
# =============================================================================
# Create a dedicated nginx config
@ -9,7 +9,7 @@
# usage: ynh_add_nginx_config
ynh_add_nginx_config () {
finalnginxconf="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_backup_if_checksum_is_different "$finalnginxconf" 1
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.
@ -29,7 +29,7 @@ ynh_add_nginx_config () {
if test -n "${final_path:-}"; then
ynh_replace_string "__FINALPATH__" "$final_path" "$finalnginxconf"
fi
ynh_store_checksum_config "$finalnginxconf"
ynh_store_file_checksum "$finalnginxconf"
sudo systemctl reload nginx
}
@ -47,7 +47,7 @@ ynh_remove_nginx_config () {
# usage: ynh_add_fpm_config
ynh_add_fpm_config () {
finalphpconf="/etc/php5/fpm/pool.d/$app.conf"
ynh_backup_if_checksum_is_different "$finalphpconf" 1
ynh_backup_if_checksum_is_different "$finalphpconf"
sudo cp ../conf/php-fpm.conf "$finalphpconf"
ynh_replace_string "__NAMETOCHANGE__" "$app" "$finalphpconf"
ynh_replace_string "__FINALPATH__" "$final_path" "$finalphpconf"
@ -58,10 +58,10 @@ ynh_add_fpm_config () {
if [ -e "../conf/php-fpm.ini" ]
then
finalphpini="/etc/php5/fpm/conf.d/20-$app.ini"
ynh_compare_checksum_config "$finalphpini" 1
ynh_backup_if_checksum_is_different "$finalphpini"
sudo cp ../conf/php-fpm.ini "$finalphpini"
sudo chown root: "$finalphpini"
ynh_store_checksum_config "$finalphpini"
ynh_store_file_checksum "$finalphpini"
fi
sudo systemctl reload php5-fpm
@ -81,7 +81,7 @@ ynh_remove_fpm_config () {
# usage: ynh_add_systemd_config
ynh_add_systemd_config () {
finalsystemdconf="/etc/systemd/system/$app.service"
ynh_compare_checksum_config "$finalsystemdconf" 1
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.
@ -92,7 +92,7 @@ ynh_add_systemd_config () {
if test -n "${app:-}"; then
ynh_replace_string "__APP__" "$app" "$finalsystemdconf"
fi
ynh_store_checksum_config "$finalsystemdconf"
ynh_store_file_checksum "$finalsystemdconf"
sudo chown root: "$finalsystemdconf"
sudo systemctl enable $app

View file

@ -62,7 +62,7 @@ sudo apt-get install -yy loolwsd code-brand
#=================================================
# Create a dedicated nginx config
ynh_nginx_config
ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
@ -82,7 +82,7 @@ ynh_system_user_create $app
#=================================================
# Create a dedicated systemd config
ynh_systemd_config
ynh_add_systemd_config
# If app is public, add url to SSOWat conf as skipped_uris
@ -93,3 +93,4 @@ fi
# Reload services
sudo service nginx reload