-
Notifications
You must be signed in to change notification settings - Fork 1
/
SSLPi.cfg
149 lines (127 loc) · 5.15 KB
/
SSLPi.cfg
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#####################################################
# Copyright (C) 2016
# IoT4pi <office@iot4pi.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the Apache License Version 2.0 (APLv2)
# as published by http://www.apache.org/licenses/LICENSE-2.0 .
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# This product includes software developed by the OpenSSL Project
# for use in the OpenSSL Toolkit. (http://www.openssl.org/)
#
#####################################################
####################################################
#Section Setup = global configuration
#If Variable Use Configuration (bUseConfig=True) is set
#Configuration will be read in, otherwise Default Variables will be used
#
# Be aware: Do not change the first part (before the : ) of the Configuration Line,
# otherwise the Value or String could not be parsed and therefore the Server is not
# able to start !
[SETUP]
bUseConfig:True
strConfig:SSLPi.cfg
#Port of the Server
iPort:10023
#Ip Address or URL
# Could be left blank for the Server
strHost:
#Home Dir of the Server where
#the certificatesare stored.
#The Directory must already exist
#it will not generate the directory
# per default Server will go to its own directory
strPath:/home/pi/SSLPi/Cert/
#Server Certificate
strCert:server.pem
#Server Key File
strKey:server.key
# command at which the client
#is going to disconnect from the server
strEndStat:EndCom
#Switch for Logging
bDebug:True
#Switch for detailed Error
#description for client
bDetailError:True
####################################################
#Section Application Calls
# This Section is the Configuration for the Application call
# which should be done by the server called by the server.
#
# The format of App Call configuration Line is specified like this:
#
# No. : Command_In ; Sequence # ; OS Command ; App+Path ; Type ; Success Return ; Arg 1 ; Arg 2 ; .....; Arg n
# -------------------------------------------------------------------------------------------------------------
# running | String | Number | True/False |called by | see |Return Value for|
# number | | Server | below|a successful |
# | Command |
#
# A call is initiated by a Command which is sent from the Client
# to the Server.
# An App Call can consist of one or more commands of the the server
# therefore the Sequence number takes care of order of the commands.
#
# The Value of OS Command can only be "True" or "False". In case of an
# OS Command the App Path needs only the command if the Path variable
# of the operating systems takes care of the rest.
#
# The App+Path should be the full Path and Name of the Command, except
# a OS Command.
# "Test" is a special command, it is an internal command which will send
# a Test Message back to the Client. Fou also have to take care in the Type
# column using the "Test" command.
#
# The Type is needed by the Server, because depending on the Command Type
# it has to be handled different. Following Types are defined:
# Test Command (sends back Test message) -- Value 0
# Change Dir (with defined directory -- Value 1
# Command without a return (like rm ) -- Value 2
# Command with return (like ls or pwd) -- Value 3
# Command handles the parameters, with return -- Value 4
# Command handles the parameters, without return -- Value 5
# Command handles the parameters,for Change Dir -- Value 6
#
# Success Return will specify which values the the sever gets, if the
# launched command was successfully processed
# Normally you will 0 or 1 but sometimes you can not predict what you
# will get but you can define what you do not want to get. In this
# case use the Reply string {!} ("= must NOT be") with return Value.
# for instance {!}ERROR
#
#Attention:
#Changing the Dir with one App_Call and doing an action with
#an other can cause trouble when an other Client is changing
#the Dir meanwhile, because Server is then in the new Dir.
#So if you want to change Dir to run an Application in
#this Dir do this in one App_Call sequence !
[APP_CALLS]
#Examples
#Client will send "ListDir"
1:ListDir;1;True;cd;1;0;/home/pi/SSLPi/app/
2:ListDir;2;True ;pwd;3;0
3:ListDir;3;True ;ls;3;0;-l
4:ListDir;4;True;rm;2;0;/home/pi/SSLPi/app/Test.txt
#Test command Client sends "Echo"
5:Echo;1;False;Test;0;0
#Client sends "SetIO 12345"
6:SetIO;1;True;cd;1;0;/home/pi/SSLPi/app/
7:SetIO;2;False;./SetIO.sh;5;0
8:SetIO;3;False;./GetIO.sh;3;{!}Error
#Client sends "ChDir /home/pi"
9:ChDir;1;True;cd;6;0
10:ChDir;2;True;pwd;3;0
11:ChDir;3;True ;ls;3;0;-l
#Client sends "Cat /home/pi/TestFile.txt"
12:Cat;1;Tue;cat;4;0
#Client sends "AddTxt this my Testline"
13:AddTxt;1;True;cd;1;0;/home/pi/SSLPi/app/
14:AddTxt;2;False;./Append.sh;5;0
#Run Command asynchron ( as a Service)
15:Time;1;True;cd;1;0;/home/pi/SSLPi/app/
16:Time;2;False;./StartTimeTest.sh;7;0