From 423fd3cb887afddba4f4db8251066caebef39774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my?= Date: Sun, 26 Mar 2017 14:23:27 +0200 Subject: [PATCH] persist php conf: migrate old configuration to new persist directory on post_install --- php.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/php.json b/php.json index de1b5d4187..312f18fda4 100644 --- a/php.json +++ b/php.json @@ -32,6 +32,12 @@ "PHP_INI_SCAN_DIR": "$persist_dir\\conf" }, "post_install": " +#Copy ini scan dir from old location before persistant update +if ((Test-Path \"$dir\\..\\conf\") -and !(Test-Path \"$persist_dir\\conf\")) { + Write-Host -ForegroundColor Cyan 'We are moving your php configuration to scoop/persist/php/conf' + Move-Item \"$dir\\..\\conf\" \"$persist_dir\\conf\" +} + #Copy PHP configuration file to expected location cp \"$dir\\php.ini-production\" \"$dir\\php.ini\"