replace config file with OPSI properties

This commit is contained in:
Dennis Trinks 2012-04-26 23:37:55 +02:00
parent 4953995159
commit 668fa3ea28
4 changed files with 15 additions and 18 deletions

View File

@ -1,3 +0,0 @@
[Webserver]
URL = "http://opsi-dev.dtnet.de/opsi/openvpn"
defPW = "sECureIT"

View File

@ -30,8 +30,7 @@ Set $wget$ = "%SystemDrive%\Programme\GnuWin32\bin\wget.exe"
Set $Ovpn-Config-Dir$ = "%SystemDrive%\Programme\OpenVPN\config"
Set $Konfig-URL$ = GetIni ("%ScriptPath%\custom\openvpn.ini" [Webserver] URL)
Set $defPW$ = GetIni ("%ScriptPath%\custom\openvpn.ini" [Webserver] defPW)
Set $pw$ = GetProductProperty ("webserver-password","values")
Set $pw$ = GetProductProperty ("htaccess-password","values")
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
; and adds the following variables:
@ -76,10 +75,6 @@ else
comment "Licensing required, reserve license and get license key"
Sub_get_licensekey
endif
if $pw$ = ""
Set $pw$ = $defPW$
endif
comment "Start setup program"
Winbatch_install
@ -118,11 +113,7 @@ endif
"%ScriptPath%\reg_ndiwswan_bind.vbs"
"%Scriptpath%\enable_rdp.vbs"
$wget$ -O $Ovpn-Config-Dir$\ca.crt --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/ca.crt
$wget$ -O $Ovpn-Config-Dir$\client.crt --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/client.crt
$wget$ -O $Ovpn-Config-Dir$\client.key --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/client.key
$wget$ -O $Ovpn-Config-Dir$\client.ovpn --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/client.ovpn
$wget$ -O $Ovpn-Config-Dir$\ta.key --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/ta.key
$wget$ -P $Ovpn-Config-Dir$ --http-user=%PCName% --password=$pw$ -r -R "index.html*" -nd -nH -np $Konfig-URL$/%PCName%
cacls $Ovpn-Config-Dir$ /E /R Benutzer
cacls $Ovpn-Config-Dir$ /E /R Hauptbenutzer

View File

@ -7,7 +7,7 @@ incremental: False
type: localboot
id: openvpn.config
name: openvpn.config
description: Konfiguration OpenVPN und Registry Anpassungen
description: Configuration OpenVPN und registry customization
advice: ADVICE
version: VERSION
priority: PRIORITY
@ -38,9 +38,18 @@ requirementType: before
[ProductProperty]
type: unicode
name: webserver-password
name: htaccess-password
multivalue: False
editable: True
description: Password for downloading configfiles
values: [""]
default: [""]
default: ["secret"]
[ProductProperty]
type: unicode
name: base-url
multivalue: False
editable: True
description: url for downloading configfiles, is extended by PCName in background
values: [""]
default: ["https://domain.com/openvpn"]

View File

@ -6,7 +6,7 @@ PN="openvpn.config"
VERSION="1"
RELEASE="1"
PRIORITY="0"
ADVICE="Pflichtfelder: apache-pw [Anmeldepasswort fuer download Konfigurationsdateien]"
ADVICE="base-url for downloading configfiles and htaccess-password must be filled out"
# TYPE - defines, if the install files are public or restricted.
# Valid value: restricted | public