Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
stemid committed Oct 13, 2016
1 parent 4746f39 commit cb16d18
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions nagios/check_ews_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
connection = ExchangeNTLMAuthConnection(
url=url,
username=username,
password=password
password=password,
verify_certificate=False
)
except Exception as e:
print('CRITICAL: Could not connect to EWS: {error}'.format(
Expand All @@ -99,7 +100,17 @@
))
exit(1)

calendar = service.calendar(id='calendar')
# Get calendar object
try:
calendar = service.calendar(id='calendar')
except Exception as e:
print('WARNING: Failed to get EWS calendar object: {error}'.format(
error=str(e)
))
exit(1)

folder = service.folder()
"""
try:
start_date = datetime.now() - timedelta(days=14)
events = calendar.list_events(
Expand All @@ -111,6 +122,7 @@
error=str(e)
))
exit(1)
"""

print('OK: EWS is working')
exit(0)
2 changes: 1 addition & 1 deletion tools/prep_centos_vm_template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ while IFS=$'= \t' read -r -a data; do
blkid -U "$uuid" &>/dev/null|| continue
disk=$(blkid -U "$uuid")
test -b "$disk" || continue
sed -i -e "s:^UUID=[^\s\t]*:$disk:" /etc/fstab
sed -i -e "s:^UUID=$uuid:$disk:" /etc/fstab
done < <(grep ^UUID= /etc/fstab)

# Maybe use this solution instead.
Expand Down

0 comments on commit cb16d18

Please sign in to comment.