Ignore:
Timestamp:
Jul 4, 2012, 6:53:50 PM (12 years ago)
Author:
joergs
Message:

bugfixes, uninstall, properties, bacula-fd.conf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • opsi/products/bacula/CLIENT_DATA/setup3264.ins

    r1022 r1023  
    1515DefVar $ProductVer$ 
    1616DefVar $MinimumSpace$
     17DefVar $InstallDir$
    1718DefVar $InstallDir32$
    1819DefVar $InstallDir64$
     
    2425DefVar $INST_architecture$
    2526
     27DefVar $filedaemon_name$
     28DefVar $filedaemon_full_name$
     29DefVar $filedaemon_full_password$
     30DefVar $filedaemon_monitor_name$
     31DefVar $filedaemon_monitor_password$
     32DefVar $director_name$
     33DefVar $director_address$
     34DefVar $director_password$
     35
     36
    2637Set $INST_SystemType$ = GetSystemType
    2738set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
    2839
     40set $filedaemon_name$ = GetProductProperty( "filedaemon_name", "" )
     41set $filedaemon_full_password$ = GetProductProperty( "filedaemon_full_password", "filedaemon_full_password" )
     42set $filedaemon_monitor_password$ = GetProductProperty( "filedaemon_monitor_password", "filedaemon_monitor_password" )
     43set $director_name$ = GetProductProperty( "director_name", "director_name" )
     44set $director_address$ = GetProductProperty( "director_address", "director_address.example.com" )
     45set $director_password$ = GetProductProperty( "director_password", "director_password" )
    2946
    3047Set $LogDir$ = "%SystemDrive%\tmp"
     
    3855Set $ProductId$       = "bacula"
    3956Set $ProductVer$      = "5.2.10"
    40 Set $MinimumSpace$    = "20 MB"
     57Set $MinimumSpace$    = "30 MB"
    4158; the path were we find the product after the installation
    42 Set $InstallDir32$      = "%ProgramFiles32Dir%\<path to the product>"
    43 Set $InstallDir64$      = "%ProgramFiles64Dir%\<path to the product>"
     59Set $InstallDir$        = "%ProgramFilesDir%\Bacula"
     60Set $InstallDir32$      = "%ProgramFiles32Dir%\Bacula"
     61Set $InstallDir64$      = "%ProgramFiles64Dir%\Bacula"
    4462Set $LicenseRequired$ = "false"
    4563Set $LicensePool$     = "p_" + $ProductId$
     
    5068        isFatalError
    5169        ; Stop process and set installation status to failed
     70endif
     71
     72comment "Show product picture"
     73ShowBitmap "%ScriptPath%\logo.png" $ProductId$
     74
     75if FileExists("%ScriptPath%\delsub3264.ins")
     76    comment "Start uninstall sub section"
     77    Sub "%ScriptPath%\delsub3264.ins"
     78endif
     79
     80;if $LicenseRequired$ = "true"
     81;       comment "Licensing required, reserve license and get license key"
     82;       Sub_get_licensekey
     83;endif
     84
     85comment "installing"
     86
     87if $filedaemon_name$ = ""
     88  set $filedaemon_full_name$    = "%PCname%-fd"
     89  set $filedaemon_monitor_name$ = "%PCname%-mon"
    5290else
    53         comment "Show product picture"
    54         ShowBitmap "%ScriptPath%\logo.png" $ProductId$
    55        
    56         if FileExists("%ScriptPath%\delsub3264.ins")
    57                 comment "Start uninstall sub section"
    58                 Sub "%ScriptPath%\delsub3264.ins"
    59         endif
    60        
    61         ;if $LicenseRequired$ = "true"
    62         ;       comment "Licensing required, reserve license and get license key"
    63         ;       Sub_get_licensekey
    64         ;endif
    65        
    66         comment "installing"
    67 
    68         if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
    69                 Message "Installing " + $ProductId$ + " 32 Bit..."
    70                 comment "Start setup program"
    71                 Winbatch_install_32
    72                 Sub_check_exitcode
    73                 ;comment "Copy files"
    74                 ;Files_install_32 /32Bit
    75                 ;comment "Patch Registry"
    76                 ;Registry_install /32Bit
    77                 ;comment "Create shortcuts"
    78                 ;LinkFolder_install
    79         endif
    80 
    81         if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
    82                 Message "Installing " + $ProductId$ + " 64 Bit..."
    83                 comment "Start setup program"
    84                 Winbatch_install_64
    85                 Sub_check_exitcode
    86                 ;comment "Copy files"
    87                 ;Files_install_64 /64Bit
    88                 ;comment "Patch Registry"
    89                 ;Registry_install /64Bit
    90                 ;comment "Create shortcuts"
    91                 ;LinkFolder_install
    92         endif
    93        
    94 endif
     91  set $filedaemon_full_name$    = "$filedaemon_name$-fd"
     92  set $filedaemon_monitor_name$ = "$filedaemon_name$-mon"
     93endif
     94
     95
     96if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
     97    Message "Installing " + $ProductId$ + " 32 Bit..."
     98    comment "Start setup program"
     99    Winbatch_install_32
     100    Sub_check_exitcode
     101    ;comment "Copy files"
     102    ;Files_install_32 /32Bit
     103    ;comment "Patch Registry"
     104    ;Registry_install /32Bit
     105    ;comment "Create shortcuts"
     106    ;LinkFolder_install
     107endif
     108
     109if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
     110    Message "Installing " + $ProductId$ + " 64 Bit..."
     111    comment "Start setup program"
     112    Winbatch_install_64
     113    Sub_check_exitcode
     114    ;comment "Copy files"
     115    ;Files_install_64 /64Bit
     116    ;comment "Patch Registry"
     117    ;Registry_install /64Bit
     118    ;comment "Create shortcuts"
     119    ;LinkFolder_install
     120endif
     121
     122;Patches_bacula_conf $InstallDir$+"\bacula-fd.conf"
     123DosBatch_bacula-fd.conf
     124
     125;
     126; end
     127;
     128
     129
     130
     131; winbatch installer:
     132; /S silent installl
     133; /D destination path
     134;       use this, otherwise it installs to "program files" for all languages.
     135;       don't use " around argument, otherwise argument is ignored
    95136
    96137[Winbatch_install_32]
    97 ; Choose one of the following examples as basis for your installation
    98 ; You can use $LicenseKey$ var to pass a license key to the installer
    99 ;
    100 ; === Nullsoft Scriptable Install System ================================================================
    101 ; "%ScriptPath%\Setup.exe" /S
    102 ;
    103 ; === MSI package =======================================================================================
    104 ; You may use the parameter PIDKEY=$Licensekey$
    105 ; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress
    106 ;
    107 ; === InstallShield + MSI=====================================================================================
    108 ; Attention: The path to the log file should not contain any whitespaces
    109 ; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=2 REBOOT=ReallySuppress"
    110 ; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress"
    111 ;
    112 ; === InstallShield =====================================================================================
    113 ; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss"
    114 ; "%ScriptPath%\setup.exe" /s /sms /f1"%ScriptPath%\setup.iss" /f2"$LogDir$\$ProductId$.install_log.txt"
    115 ;
    116 ; === Inno Setup ========================================================================================
    117 ; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html
    118 ; You may create setup answer file by: setup.exe /SAVEINF="filename"
    119 ; You may use an answer file by the parameter /LOADINF="filename"
    120 ; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES
    121 
    122 "%ScriptPath%\data\bacula-win32-$ProductVer$.exe" /S
     138"%ScriptPath%\data\bacula-win32-$ProductVer$.exe" /S /D=$InstallDir32$
     139
     140[Winbatch_install_64]
     141"%ScriptPath%\data\bacula-win64-$ProductVer$.exe" /S /D=$InstallDir64$
     142
     143[DosBatch_bacula-fd.conf]
     144(
     145echo # managed by opsi
     146echo #
     147echo # "Global" File daemon configuration specifications
     148echo #
     149echo FileDaemon {                            # this is me
     150echo   Name = $filedaemon_full_name$
     151echo   FDport = 9102                # where we listen for the director
     152echo   WorkingDirectory = "$InstallDir32$\\working"
     153echo   Pid Directory = "$InstallDir32$\\working"
     154echo   Plugin Directory = "$InstallDir32$\\plugins"
     155echo   Maximum Concurrent Jobs = 10
     156echo }
     157;echo
     158echo #
     159echo # List Directors who are permitted to contact this File daemon
     160echo #
     161echo Director {
     162echo   Name     = $director_name$
     163echo   Password = "$filedaemon_full_password$"
     164echo }
     165;echo
     166echo #
     167echo # Restricted Director, used by tray-monitor to get the
     168echo #   status of the file daemon
     169echo #
     170echo Director {
     171echo   Name     = $filedaemon_monitor_name$
     172echo   Password = "$filedaemon_monitor_password$"
     173echo   Monitor  = yes
     174echo }
     175;echo
     176echo # Send all messages except skipped files back to Director
     177echo Messages {
     178echo   Name = Standard
     179echo   director = $director_name$ = all, !skipped, !restored
     180echo }
     181) >> $InstallDir$/bacula-fd.conf
    123182
    124183
     
    128187;
    129188; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$"
    130 
    131 [Winbatch_install_64]
    132 ; Choose one of the following examples as basis for your installation
    133 ; You can use $LicenseKey$ var to pass a license key to the installer
    134 ;
    135 ; === Nullsoft Scriptable Install System ================================================================
    136 ; "%ScriptPath%\Setup.exe" /S
    137 ;
    138 ; === MSI package =======================================================================================
    139 ; You may use the parameter PIDKEY=$Licensekey$
    140 ; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress
    141 ;
    142 ; === InstallShield + MSI=====================================================================================
    143 ; Attention: The path to the log file should not contain any whitespaces
    144 ; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=2 REBOOT=ReallySuppress"
    145 ; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress"
    146 ;
    147 ; === InstallShield =====================================================================================
    148 ; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss"
    149 ; "%ScriptPath%\setup.exe" /s /sms /f1"%ScriptPath%\setup.iss" /f2"$LogDir$\$ProductId$.install_log.txt"
    150 ;
    151 ; === Inno Setup ========================================================================================
    152 ; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html
    153 ; You may create setup answer file by: setup.exe /SAVEINF="filename"
    154 ; You may use an answer file by the parameter /LOADINF="filename"
    155 ; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES
    156 
    157 "%ScriptPath%\data\bacula-win64-$ProductVer$.exe" /S
    158 
    159 
    160189
    161190[Files_install_64]
Note: See TracChangeset for help on using the changeset viewer.