From ece376f159cdc75c6b5938ec992b22da64d9e8b0 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Wed, 30 Nov 2016 17:43:02 +0100 Subject: [PATCH] Install sous-dossier --- manifest.json | 4 ++-- scripts/install | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index ced404d..263c9d6 100644 --- a/manifest.json +++ b/manifest.json @@ -24,7 +24,7 @@ "fr": "Choisissez un domaine pour Jenkins" }, "example": "domain.org", - "default": "sous.crudelis-test4.fr" + "default": "crudelis-test4.fr" }, { "name": "path", @@ -33,7 +33,7 @@ "fr": "Choisissez un path pour Jenkins" }, "example": "/jenkins", - "default": "/" + "default": "/jenkins" }, { "name": "is_public", diff --git a/scripts/install b/scripts/install index 03a789a..b405dde 100644 --- a/scripts/install +++ b/scripts/install @@ -26,12 +26,13 @@ sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sour sudo apt-get update sudo apt-get install jenkins -y +sudo sed -i "s/^HTTP_PORT=.*/HTTP_PORT=$port/g" /etc/default/jenkins + if [[ "$path" != "/" ]]; then # $ means 'process only the last line' - sudo sed -i '$ s@--httpPort=$HTTP_PORT"@--httpPort=$HTTP_PORT" --prefix=$PREFIX@g' /etc/default/jenkins + sudo sed -i "$ s@--httpPort=\$HTTP_PORT@& --prefix=$path@g" /etc/default/jenkins fi -sudo sed -i "s/HTTP_PORT=.*/HTTP_PORT=$port/g" /etc/default/jenkins sudo sed -i "s/-Djava.awt.headless=true/& -Djenkins.install.runSetupWizard=false/g" /etc/default/jenkins