diff --git a/conf/app.src b/conf/app.src index 10abb29..bb9317d 100644 --- a/conf/app.src +++ b/conf/app.src @@ -3,4 +3,4 @@ SOURCE_SUM=3639eaf70a37ee0513c75259c70b3d0c2c10116e9b2989dc9c571f98017120bd SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=codimd.tar.gz \ No newline at end of file +SOURCE_FILENAME=codimd.tar.gz diff --git a/conf/systemd.service b/conf/systemd.service index 7b1b7e5..5505b7d 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -5,6 +5,8 @@ After=mysql.service [Service] Type=simple +User=__APP__ +Group=__APP__ WorkingDirectory=__FINALPATH__ Environment="PATH=__ENV_PATH__" Environment="NODE_ENV=production" diff --git a/scripts/install b/scripts/install index 6b2a705..d9221e5 100644 --- a/scripts/install +++ b/scripts/install @@ -155,10 +155,10 @@ ynh_use_logrotate #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=1 -ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/systemd.service" -ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="../conf/systemd.service" +#ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/systemd.service" +#ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_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="__NODE__" --replace_string="$nodejs_path" --target_file="../conf/systemd.service" +#ynh_replace_string --match_string="__NODE__" --replace_string="$nodejs_path" --target_file="../conf/systemd.service" ynh_add_systemd_config diff --git a/scripts/upgrade b/scripts/upgrade index 621ab2b..d6a4712 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -171,14 +171,14 @@ ynh_use_logrotate --non-append #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=2 -ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/systemd.service" -ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="../conf/systemd.service" +#ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/systemd.service" +#ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_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="__NODE__" --replace_string="$nodejs_path" --target_file="../conf/systemd.service" +#ynh_replace_string --match_string="__NODE__" --replace_string="$nodejs_path" --target_file="../conf/systemd.service" ynh_add_systemd_config -#yunohost service add "$app" --description "CodiMD daemon" +yunohost service add "$app" --description "CodiMD daemon" --log="/var/log/$app/$app.log" #================================================= # SECURE FILES AND DIRECTORIES