-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstart_cli.py
28 lines (23 loc) · 1 KB
/
start_cli.py
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
import argparse
from stig_4_pardus_kural_kontrol import *
versiyon = "1.0"
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--kontrol", "-k", help="Kontrol İşlemini Başlatmak İçin Bu Parametreyi Verin",action="store_true")
parser.add_argument("--versiyon", "-v", help="Versiyon Kontrol Etmek İçin Bu Parametreyi Verin", action="store_true")
parser.add_argument("--dizin", "-d", help="Log Dizini Değiştirmek İçin Bu Parametreyi Verin (Boş bırakırsanız: /var/www/html/ e kayıt eder)")
args = parser.parse_args()
if not args.kontrol and not args.versiyon:
parser.print_help()
else:
if args.versiyon:
print("Uygulama versiyonu:" , versiyon)
quit()
if args.kontrol:
if args.dizin is not None:
dizin = args.dizin
else:
dizin = "/var/www/html/"
#print(dizin)
nesne = Stig4Pardus_Kontrol()
nesne.kontrol(dizin)