From 9d9406b46be93da00f3c62ddf6c6b58b1ecc53c0 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 10 Jan 2014 17:39:10 +0100 Subject: [PATCH] Adjust GajimProfile script, and start it earlier, before Gajim itself is started --- .../{020GajimProfile.bat => 005GajimProfile.bat} | 29 +++++++++++++++++----- 1 file changed, 23 insertions(+), 6 deletions(-) rename root/home/e-smith/files/shares/tools/files/scripts/session/{020GajimProfile.bat => 005GajimProfile.bat} (63%) diff --git a/root/home/e-smith/files/shares/tools/files/scripts/session/020GajimProfile.bat b/root/home/e-smith/files/shares/tools/files/scripts/session/005GajimProfile.bat similarity index 63% rename from root/home/e-smith/files/shares/tools/files/scripts/session/020GajimProfile.bat rename to root/home/e-smith/files/shares/tools/files/scripts/session/005GajimProfile.bat index a72e606..6c30299 100644 --- a/root/home/e-smith/files/shares/tools/files/scripts/session/020GajimProfile.bat +++ b/root/home/e-smith/files/shares/tools/files/scripts/session/005GajimProfile.bat @@ -1,8 +1,28 @@ REM Configuration de Gajim au premier lancement +if not exist "%PROGRAMFILES%\Gajim\bin\gajim.exe" ( + if not exist "%PROGRAMFILES(x86)%\Gajim\bin\gajim.exe" goto :EOF +) + if not exist "%APPDATA%\Gajim\Config" ( -mkdir "%APPDATA%\Gajim\" -echo one_message_window = always_with_roster>> "%APPDATA%\Gajim\Config" + mkdir "%APPDATA%\Gajim\" + GOTO :CONF +) +else ( + type "%APPDATA%\Gajim\Config" | find /I "accounts." | find /V /I ".local." >NUL 2>NUL + if %errorlevel% NEQ 0 ( + taskkill /F /IM gajim.exe + GOTO :CONF + ) + else ( + echo "Gajim est configure" + goto :EOF + ) +) + +:CONF +echo one_message_window = always_with_roster> "%APPDATA%\Gajim\Config" +echo show_roster_on_startup = never>> "%APPDATA%\Gajim\Config" echo accounts.%IPASSERELLE_DOMAIN%.autoauth = True>> "%APPDATA%\Gajim\Config" echo accounts.%IPASSERELLE_DOMAIN%.name = %USERNAME%>> "%APPDATA%\Gajim\Config" echo accounts.%IPASSERELLE_DOMAIN%.hostname = %IPASSERELLE_DOMAIN%>> "%APPDATA%\Gajim\Config" @@ -13,7 +33,4 @@ echo accounts.%IPASSERELLE_DOMAIN%.autoconnect_as = online>> "%APPDATA%\Gajim\Co echo accounts.%IPASSERELLE_DOMAIN%.custom_host = %IPASSERELLE_NAME%.%IPASSERELLE_DOMAIN%>> "%APPDATA%\Gajim\Config" echo accounts.%IPASSERELLE_DOMAIN%.send_os_info = False>> "%APPDATA%\Gajim\Config" echo accounts.%IPASSERELLE_DOMAIN%.enable_message_carbons = True>> "%APPDATA%\Gajim\Config" -) -else ( -echo "Gajim est configure" -) +