From b31378ad1a3bc35cfdaa1ea3c5fa50e03e6b4497 Mon Sep 17 00:00:00 2001
From: hypercubus <hypercubus>
Date: Thu, 26 Aug 2004 17:22:37 +0000
Subject: [PATCH] local scripts are now made executable by postinstall.sh

---
 installer/resources/ProcessPanel.Spec.xml           | 4 +++-
 installer/resources/postinstall.bat                 | 1 +
 installer/resources/{postinstall => postinstall.sh} | 9 ++++++++-
 3 files changed, 12 insertions(+), 2 deletions(-)
 rename installer/resources/{postinstall => postinstall.sh} (70%)

diff --git a/installer/resources/ProcessPanel.Spec.xml b/installer/resources/ProcessPanel.Spec.xml
index bdd8198a3c..b632c33a75 100644
--- a/installer/resources/ProcessPanel.Spec.xml
+++ b/installer/resources/ProcessPanel.Spec.xml
@@ -7,6 +7,8 @@
     </job>
     <job name="Launching I2P...">
         <os family="unix" />
-        <executefile name="$INSTALL_PATH/postinstall" />
+        <executefile name="$INSTALL_PATH/sh">
+            <arg>postinstall.sh</arg>
+        </executefile>
     </job>
 </processing>
\ No newline at end of file
diff --git a/installer/resources/postinstall.bat b/installer/resources/postinstall.bat
index 9c00fa9c6f..26049a9822 100644
--- a/installer/resources/postinstall.bat
+++ b/installer/resources/postinstall.bat
@@ -11,6 +11,7 @@
 :: I2P router as a background service.
 
 @echo off
+setlocal
 set INSTALL_PATH=%~dp0
 copy "%INSTALL_PATH%lib\wrapper\win32\I2Psvc.exe" "%INSTALL_PATH%"
 copy "%INSTALL_PATH%lib\wrapper\win32\wrapper.dll" "%INSTALL_PATH%lib"
diff --git a/installer/resources/postinstall b/installer/resources/postinstall.sh
similarity index 70%
rename from installer/resources/postinstall
rename to installer/resources/postinstall.sh
index be598c7055..4a6fb5b3bc 100644
--- a/installer/resources/postinstall
+++ b/installer/resources/postinstall.sh
@@ -12,7 +12,13 @@
 # Installs the appropriate set of Java Service Wrapper support files for the
 # user's OS then launches the I2P router as a background service.
 
-ERROR_MSG="Cannot determine operating system type. Please move the service files manually from the subdirectory in lib/wrapper for your OS."
+chmod 744 i2prouter
+chmod 744 i2psvc
+chmod 744 install_i2p_service_unix
+chmod 744 osid
+chmod 744 uninstall_i2p_service_unix
+
+ERROR_MSG="Cannot determine operating system type. From the subdirectory in lib/wrapper matching your operating system, please move i2psvc to your base I2P directory, and move the remaining two files to the lib directory."
 HOST_OS=`./osid`
 
 if [[ ! $HOST_OS || $HOST_OS = "unknown" ]]; then
@@ -41,4 +47,5 @@ esac
 
 cp $wrapperpath/i2psvc .
 cp $wrapperpath/* ./lib/
+./i2prouter start
 exit 0
-- 
GitLab