replace config file with OPSI properties
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
[Webserver]
|
||||
URL = "http://opsi-dev.dtnet.de/opsi/openvpn"
|
||||
defPW = "sECureIT"
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user