Bonjour j'ai téléchargé un script .bat fonctionnat sur windows et j'aimerais le modifié pour qu'il puisse fonctionné avec Linux
je suis un peu confuse dans mon script au niveau des tests(if). Comment est ce que je peux les modifiés pour qu'ils puissent etre utilisables sous linux?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 if "%OP_CERT_COUNTRY%" == "" goto edit_script if "%OP_CERT_STATE%" == "" goto edit_script if "%OP_CERT_LOCALITY%" == "" goto edit_script if "%OP_CERT_ORG%" == "" goto edit_script if "%OP_CERT_CA_DAYS%" == "" goto edit_script if "%OP_CERT_CERT_DAYS%" == "" goto edit_script shift if "%0" == "" goto help if "%0" == "help" goto help if "%0" == "dsaparam" goto dsaparam if "%0" == "gencakey" goto gencakey if "%0" == "genmanager" goto genmanager
Aussi je ne comprends pas ce bout de code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44 goto end :help echo usage: op_cert command echo. echo commands: echo dsaparam: generates DSA parameters echo gencakey: generates the certificate authority's private and public keys echo genmanager: generates the certificates used by the capture manager echo help: displays this text echo. echo Certificate generation requires generating the DSA parameters first. echo If the DSA parameter file (dsaparam.pem) already exists, there is no echo need to generate a new DSA parameter file. goto end :dsaparam openssl dsaparam -outform PEM -out dsaparam.pem 1024 goto end :gencakey ECHO. ECHO =========================================== ECHO Generating the private and public keys for the certificate authority. This operation only needs to be done once. ECHO Enter the same passphrase three times.This passphrase should be kept secure. ECHO ============================================== ECHO. echo [ req ] > openssl.cnf echo default_bits = 1024 >> openssl.cnf echo default_keyfile = privkey.pem >> openssl.cnf echo distinguished_name = req_distinguished_name >> openssl.cnf echo prompt = no >> openssl.cnf echo [ req_distinguished_name ] >> openssl.cnf echo C = %OP_CERT_COUNTRY% >> openssl.cnf echo ST = %OP_CERT_STATE% >> openssl.cnf echo L :end set OP_CERT_COUNTRY= set OP_CERT_STATE= set OP_CERT_LOCALITY= set OP_CERT_ORG=
Merci d'avance
Partager