From 44eb42fb67506c8c8eccd59e231ff9eb7385038c Mon Sep 17 00:00:00 2001 From: Matthieu Faure <mfaure@asqatasun.org> Date: Sun, 17 Mar 2019 18:14:32 +0100 Subject: [PATCH] app.php: remove debug --- manifests/init.pp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 5bbdacb..295dc5f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -17,7 +17,8 @@ class comptoir ( String $comptoir_user = 'comptoir', # Stdlib::Absolutepath $comptoir_dir = '/home/comptoir/Comptoir-srv', - String $comptoir_dir = '/home/comptoir/Comptoir-srv', # TODO grab this info from the repos URL + String $comptoir_dir = '/home/comptoir/Comptoir-srv', + # TODO grab this info from the repos URL, use Stdlib::basename Stdlib::Httpsurl $comptoir_repos_url = 'https://gitlab.adullact.net/Comptoir/Comptoir-srv.git', String $comptoir_revision = 'master', String $comptoir_db_user = 'comptoir', @@ -29,6 +30,8 @@ class comptoir ( # Inner variables $_SQL_create_tables_and_procedure = 'config/SQL/COMPTOIR_DB_create_tables_and_procedures.sql' + $_file_app_php = "${comptoir_dir}/config/app.php" + $_file_comptoir_php = "${comptoir_dir}/config/comptoir.php" # Grab source code vcsrepo { $comptoir_dir: @@ -68,5 +71,14 @@ class comptoir ( timeout => 1200, # default value (300s) * 4 } - # + # Comptoir configuration: APP.PHP + -> Exec { 'Comptoir remove debug': + command => "sed -i -e \"s/\/\/COMPTOIR-DEBUG//\" $_file_app_php", + cwd => $comptoir_dir, + user => $comptoir_user, + environment => [ 'HOME=/home/comptoir' ], + } + + # Comptoir configuration: COMPTOIR.PHP + } -- GitLab