Browse Source

Check functions

Bob Mottram 8 years ago
parent
commit
602bb38178
1 changed files with 164 additions and 0 deletions
  1. 164
    0
      src/freedombone-utils-setup

+ 164
- 0
src/freedombone-utils-setup View File

235
 	fi
235
 	fi
236
 }
236
 }
237
 
237
 
238
+function create_completion_file {
239
+	if [ ! -f $COMPLETION_FILE ]; then
240
+		touch $COMPLETION_FILE
241
+	fi
242
+}
243
+
238
 function upgrade_installation {
244
 function upgrade_installation {
239
 	# TODO
245
 	# TODO
240
 	echo ''
246
 	echo ''
241
 }
247
 }
242
 
248
 
243
 function setup_firewall {
249
 function setup_firewall {
250
+	function_check create_completion_file
251
+	create_completion_file
252
+
253
+	function_check configure_firewall
244
 	configure_firewall
254
 	configure_firewall
255
+
256
+	function_check configure_firewall_ping
245
 	configure_firewall_ping
257
 	configure_firewall_ping
258
+
259
+	function_check configure_firewall_for_dns
246
 	configure_firewall_for_dns
260
 	configure_firewall_for_dns
261
+
262
+	function_check configure_firewall_for_avahi
247
 	configure_firewall_for_avahi
263
 	configure_firewall_for_avahi
248
 }
264
 }
249
 
265
 
250
 function setup_utils {
266
 function setup_utils {
267
+	function_check create_completion_file
268
+	create_completion_file
269
+
270
+	function_check read_configuration
251
 	read_configuration
271
 	read_configuration
272
+
273
+	function_check upgrade_installation
252
 	upgrade_installation
274
 	upgrade_installation
275
+
276
+	function_check set_default_onion_domains
253
 	set_default_onion_domains
277
 	set_default_onion_domains
278
+
279
+	function_check locale_setup
254
 	locale_setup
280
 	locale_setup
281
+
282
+	function_check parse_args
255
 	parse_args
283
 	parse_args
284
+
285
+	function_check check_domains
256
 	check_domains
286
 	check_domains
287
+
288
+	function_check install_static_network
257
 	install_static_network
289
 	install_static_network
290
+
291
+	function_check remove_default_user
258
 	remove_default_user
292
 	remove_default_user
293
+
294
+	function_check setup_firewall
259
 	setup_firewall
295
 	setup_firewall
296
+
297
+	function_check create_repo_sources
260
 	create_repo_sources
298
 	create_repo_sources
299
+
300
+	function_check configure_dns
261
 	configure_dns
301
 	configure_dns
302
+
303
+	function_check initial_setup
262
 	initial_setup
304
 	initial_setup
305
+
306
+	function_check install_tor
263
 	install_tor
307
 	install_tor
308
+
309
+	#function_check resolve_dns_via_tor
264
 	#resolve_dns_via_tor
310
 	#resolve_dns_via_tor
311
+
312
+	function_check install_command_line_browser
265
 	install_command_line_browser
313
 	install_command_line_browser
314
+
315
+	function_check enable_ssh_via_onion
266
 	enable_ssh_via_onion
316
 	enable_ssh_via_onion
317
+
318
+	function_check check_date
267
 	check_date
319
 	check_date
320
+
321
+	function_check install_dynamicdns
268
 	install_dynamicdns
322
 	install_dynamicdns
323
+
324
+	function_check randomize_cron
269
 	randomize_cron
325
 	randomize_cron
326
+
327
+	function_check create_freedns_updater
270
 	create_freedns_updater
328
 	create_freedns_updater
329
+
330
+	function_check mark_admin_user_account
271
 	mark_admin_user_account
331
 	mark_admin_user_account
332
+
333
+	function_check enforce_good_passwords
272
 	enforce_good_passwords
334
 	enforce_good_passwords
335
+
336
+	function_check install_editor
273
 	install_editor
337
 	install_editor
338
+
339
+	function_check change_login_message
274
 	change_login_message
340
 	change_login_message
341
+
342
+	function_check enable_zram
275
 	enable_zram
343
 	enable_zram
344
+
345
+	function_check random_number_generator
276
 	random_number_generator
346
 	random_number_generator
347
+
348
+	function_check set_your_domain_name
277
 	set_your_domain_name
349
 	set_your_domain_name
350
+
351
+	function_check time_synchronisation_tlsdate
278
 	time_synchronisation_tlsdate
352
 	time_synchronisation_tlsdate
353
+
354
+	function_check configure_internet_protocol
279
 	configure_internet_protocol
355
 	configure_internet_protocol
356
+
357
+	function_check create_git_project
280
 	create_git_project
358
 	create_git_project
359
+
360
+	function_check setup_wifi
281
 	setup_wifi
361
 	setup_wifi
362
+
363
+	function_check configure_ssh
282
 	configure_ssh
364
 	configure_ssh
365
+
366
+	function_check configure_ssh_onion
283
 	configure_ssh_onion
367
 	configure_ssh_onion
368
+
369
+	function_check allow_ssh_to_onion_address
284
 	allow_ssh_to_onion_address
370
 	allow_ssh_to_onion_address
371
+
372
+	function_check remove_instructions_from_motd
285
 	remove_instructions_from_motd
373
 	remove_instructions_from_motd
374
+
375
+	function_check check_hwrng
286
 	check_hwrng
376
 	check_hwrng
377
+
378
+	function_check search_for_attached_usb_drive
287
 	search_for_attached_usb_drive
379
 	search_for_attached_usb_drive
380
+
381
+	function_check regenerate_ssh_keys
288
 	regenerate_ssh_keys
382
 	regenerate_ssh_keys
383
+
384
+	function_check create_mirrors
289
 	create_mirrors
385
 	create_mirrors
386
+
387
+	function_check create_upgrade_script
290
 	create_upgrade_script
388
 	create_upgrade_script
389
+
390
+	function_check letsencrypt_renewals
291
 	letsencrypt_renewals
391
 	letsencrypt_renewals
392
+
393
+	function_check install_watchdog_script
292
 	install_watchdog_script
394
 	install_watchdog_script
395
+
396
+	function_check install_avahi
293
 	install_avahi
397
 	install_avahi
398
+
399
+	function_check create_avahi_onion_domains
294
 	create_avahi_onion_domains
400
 	create_avahi_onion_domains
401
+
402
+	#function_check install_atheros_wifi
295
 	#install_atheros_wifi
403
 	#install_atheros_wifi
404
+
405
+	function_check route_outgoing_traffic_through_tor
296
 	route_outgoing_traffic_through_tor
406
 	route_outgoing_traffic_through_tor
407
+
408
+	function_check upgrade_golang
297
 	upgrade_golang
409
 	upgrade_golang
298
 }
410
 }
299
 
411
 
300
 function setup_email {
412
 function setup_email {
413
+	function_check create_completion_file
414
+	create_completion_file
415
+
416
+	function_check install_email
301
 	install_email
417
 	install_email
418
+
419
+	function_check create_procmail
302
 	create_procmail
420
 	create_procmail
421
+
422
+	function_check handle_admin_emails
303
 	handle_admin_emails
423
 	handle_admin_emails
424
+
425
+	function_check spam_filtering
304
 	spam_filtering
426
 	spam_filtering
427
+
428
+	function_check configure_imap
305
 	configure_imap
429
 	configure_imap
430
+
431
+	#function_check configure_imap_client_certs
306
 	#configure_imap_client_certs
432
 	#configure_imap_client_certs
433
+
434
+	function_check configure_gpg
307
 	configure_gpg
435
 	configure_gpg
436
+
437
+	function_check refresh_gpg_keys
308
 	refresh_gpg_keys
438
 	refresh_gpg_keys
439
+
440
+	function_check configure_backup_key
309
 	configure_backup_key
441
 	configure_backup_key
442
+
443
+	function_check install_monkeysphere
310
 	install_monkeysphere
444
 	install_monkeysphere
445
+
446
+	function_check encrypt_incoming_email
311
 	encrypt_incoming_email
447
 	encrypt_incoming_email
448
+
449
+	function_check encrypt_outgoing_email
312
 	encrypt_outgoing_email
450
 	encrypt_outgoing_email
451
+
452
+	function_check email_client
313
 	email_client
453
 	email_client
454
+
455
+	function_check email_archiving
314
 	email_archiving
456
 	email_archiving
457
+
458
+	function_check email_from_address
315
 	email_from_address
459
 	email_from_address
460
+
461
+	function_check create_public_mailing_list
316
 	create_public_mailing_list
462
 	create_public_mailing_list
463
+
464
+	#function check create_private_mailing_list
317
 	#create_private_mailing_list
465
 	#create_private_mailing_list
466
+
467
+	function_check encrypt_all_email
318
 	encrypt_all_email
468
 	encrypt_all_email
469
+
470
+	function_check import_email
319
 	import_email
471
 	import_email
320
 }
472
 }
321
 
473
 
322
 function setup_web {
474
 function setup_web {
475
+	function_check create_completion_file
476
+	create_completion_file
477
+
478
+	function_check install_web_server
323
 	install_web_server
479
 	install_web_server
480
+
481
+	function_check install_web_server_access_control
324
 	install_web_server_access_control
482
 	install_web_server_access_control
325
 }
483
 }
326
 
484
 
327
 function upgrade_apps {
485
 function upgrade_apps {
486
+	function_check create_completion_file
487
+	create_completion_file
488
+
328
 	APPS_COMPLETED=()
489
 	APPS_COMPLETED=()
329
 	FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*
490
 	FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*
330
 
491
 
344
 }
505
 }
345
 
506
 
346
 function setup_apps {
507
 function setup_apps {
508
+	function_check create_completion_file
509
+	create_completion_file
510
+
347
 	function_check choose_apps_for_variant
511
 	function_check choose_apps_for_variant
348
 	choose_apps_for_variant "$SYSTEM_TYPE"
512
 	choose_apps_for_variant "$SYSTEM_TYPE"
349
 
513