@@ -113,6 +113,112 @@ Using https://www.devuan.org just compile and install Dowse following
113
113
the procedure above. Images are available for a several popular ARM
114
114
devices including RaspberryPI2 and 3, BananaPI, Cubieboard etc.
115
115
116
+ # Starting Dowse
117
+
118
+ Here below an example start script launching all services in
119
+ Dowse. Some can be commented / expunged ad-hoc depending from use
120
+ cases, since the only vital functions are ` redis-server ` , ` dhcpd ` and
121
+ ` dnscrypt-proxy ` .
122
+
123
+ ``` zsh
124
+ # /usr/bin/env zsh
125
+
126
+ source /etc/dowse/settings
127
+ source /usr/local/dowse/zshrc
128
+
129
+ notice " Starting Dowse"
130
+
131
+ # start the redis daemon (core k/v service)
132
+ start redis-server
133
+
134
+ notice " Starting all daemons in Dowse"
135
+
136
+ # launch the dhcp daemon
137
+ start dhcpd
138
+
139
+ # start the dns encrypted tunneling
140
+ start dnscrypt-proxy
141
+
142
+ # start the sql database
143
+ start mysqld
144
+
145
+ # start web interface
146
+ start webui
147
+
148
+ # start the mqtt/websocket hub
149
+ start mosquitto
150
+
151
+ # netdata dashboard for the technical status
152
+ start netdata
153
+
154
+ # nodejs/node-red
155
+ start node-red
156
+
157
+ # start the cronjob handler (with resolution to seconds)
158
+ start seccrond
159
+
160
+ notice " Dowse succesfully started"
161
+
162
+ }
163
+ ```
164
+
165
+ Adding the following line one can set up an open network, what we call it "party mode":
166
+
167
+ ```
168
+ echo "set party-mode ON" | redis-cli
169
+ ```
170
+
171
+ As a good practice, such a script can be launched from ` /etc/rc.local ` for user dowse using ` setuidgid ` from the ` daemontools ` package.
172
+
173
+ The next is an example on how to stop dowse, for instance from a stop.sh script:
174
+
175
+ ``` zsh
176
+ # /usr/bin/env zsh
177
+
178
+ source /usr/local/dowse/zshrc
179
+
180
+ notice " Stopping all daemons in Dowse"
181
+
182
+ stop seccrond
183
+
184
+ stop mosquitto
185
+
186
+ stop webui
187
+
188
+ stop mysqld
189
+
190
+ # stop nodejs/node-red
191
+ stop node-red
192
+
193
+ # stop the dashboard
194
+ stop netdata
195
+
196
+ # stop the dns crypto tunnel
197
+ stop dnscrypt-proxy
198
+
199
+ # stop the dhcp server
200
+ stop dhcpd
201
+
202
+ # remove the layer 2 firewall rules
203
+ ebtables-stop
204
+
205
+ # remove the layer 3 firewall rules
206
+ iptables-snat-off
207
+ iptables-stop
208
+
209
+ # restore backup if present
210
+ # [[ -r /etc/resolv.conf.dowse-backup ]] && {
211
+ # mv /etc/resolv.conf.dowse-backup /etc/resolv.conf
212
+ # }
213
+
214
+ stop redis-server
215
+
216
+ notice " Dowse has stopped running."
217
+ ```
218
+
219
+ The scripts above are found in dowse source as ` start.sh ` and ` stop.sh ` and can be customised and called from the system at boot. It is also possible to run an interactive console with completion where dowse commands are available using the ` console.sh ` script. Once in the console all the above start/stop commands and even more internals will be available to be launched interactively.
220
+
221
+
116
222
# Visualization
117
223
118
224
The DNS visualization is produced in a custom format which can be
0 commit comments