Commit Graph

23 Commits

Author SHA1 Message Date
Jed Reynolds
2be72140c9 adjust_apache.pl: fixes printing more than one copy of the current management hostname
This was happening when a unit was getting moved between networks and a totally different IP was found for it

Signed-off-by: Jed Reynolds <jed@candelatech.com>
2021-04-05 17:02:48 -07:00
Jed Reynolds
8f8b50ecfe adjust_apache.pl: fixes GetOpt arguments to behave better under F24 and earlier
Signed-off-by: Jed Reynolds <jed@candelatech.com>
2021-04-05 17:02:48 -07:00
Jed Reynolds
878cbe4009 adjust_apache: detects and uses colordiff if available
Signed-off-by: Jed Reynolds <jed@candelatech.com>
2021-03-26 15:59:07 -07:00
Jed Reynolds
d2c1714417 adjust_apache.pl: more improvements:
- reformatted inconsistent indentation
- added options '-a' automatic '-h' help '-d' debug
- tests for '-t STDIN' to determine if interactive mode terminal
- prints diff -y comparison of diff files
- does not copy if no changes
- logs warnings and errors using logger
- you can check journalctl to see where backup and editfiles are
- reduces debug output

Signed-off-by: Jed Reynolds <jed@candelatech.com>
2021-02-27 12:56:12 -08:00
Jed Reynolds
c6ce8e2eee adjust_apache.pl: several fixes:
- avoids printing eth0 hostname multiple times
- stops printing LF-HOSTNAME-NEXT multiple times
- fixes die() on untracked ip address
- fixes warnings about duplicate IPs for hostnames
- writes to temp file before copying it over to /etc/hosts
- checks length of /tmp/t_hosts_X file and exits if length is zero
- backs up /etc/hosts to /etc/.hosts-$datetime before starting edits

Signed-off-by: Jed Reynolds <jed@candelatech.com>
2021-02-26 18:34:01 -08:00
Jed Reynolds
adbe9484db adjust_apache.pl: updates servername section of apache config to help when instance gets renamed 2021-01-11 23:08:53 -08:00
Jed Reynolds
7e9812a45e adjust_apache improvements:
- preserves comments better
- preseves line order better
- removes any CR-LF characters
- turns on debug mode from environment variable DEBUG=1
2020-12-09 13:36:08 -08:00
Jed Reynolds
0f12515bbd adjust_apache.pl: fixes removing old IPs remaining from previous leases; fixes greedy matching hostnames with hyphens that should stay separate (X-local) 2020-07-07 22:59:40 -07:00
Jed Reynolds
56e84cbbc4 adjust_apache: quieter now 2020-05-06 16:00:36 -07:00
Jed Reynolds
48caf7e8cf adjust_apache: handles linebreaks and linejoins more logically 2020-05-06 15:54:41 -07:00
Jed Reynolds
3d7217ffa0 adjust_apache: retrofits adjust_apache to handle manged /etc/hosts file 2020-05-06 15:39:42 -07:00
Jed Reynolds
0867751610 adjust_apache: retrofits adjust_apache to handle manged /etc/hosts file 2020-05-06 14:33:07 -07:00
Ben Greear
30980460a6 Fix typo in adjust-apache script. 2020-03-05 13:19:45 -08:00
Jed Reynolds
8f38e50513 adjust_apache updated to consolidate hostnames for manangement ip, duplicate hostname lines cause trouble 2020-02-24 15:42:28 -08:00
Ben Greear
756b1ceb09 adjust-apache: Better handling for /etc/hosts
Signed-off-by: Ben Greear <greearb@candelatech.com>
2019-11-21 14:20:10 -08:00
Jed Reynolds
f42fc97a19 detects out of date mgr_port values 2019-11-12 17:40:38 -08:00
Jed Reynolds
6dad1cedae adjust_apache now smarter about self signed certers 2019-11-12 14:24:40 -08:00
Jed Reynolds
f307a27fac quieter 2019-05-23 12:49:13 -07:00
Jed Reynolds
dc459bf2b8 updates apache files on ubuntu 2019-05-23 12:42:28 -07:00
Jed Reynolds
75980515e1 WIP: fixes ever growing whitepsace 2019-05-21 18:05:15 -07:00
Jed Reynolds
edc1e39292 WIP: working regex 2019-05-21 17:57:40 -07:00
Jed Reynolds
1f13f03063 script can now update etc/hosts with lanforge-mgr address 2019-05-21 17:27:55 -07:00
Jed Reynolds
4324ba5a29 WIP: script to correleate mgt_dev and apache default vhost 2019-05-21 15:45:08 -07:00