diff --git a/plugins/bacula/bacula_job b/plugins/bacula/bacula_job index af030bd7..65d6e8ff 100755 --- a/plugins/bacula/bacula_job +++ b/plugins/bacula/bacula_job @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # Copyright (C) 2009 Andreas Thienemann # diff --git a/plugins/bacula/bacula_sd b/plugins/bacula/bacula_sd index f623c4a9..545db656 100755 --- a/plugins/bacula/bacula_sd +++ b/plugins/bacula/bacula_sd @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # Copyright (C) 2009 Andreas Thienemann # diff --git a/plugins/prosody/prosody_ b/plugins/prosody/prosody_ index 53aa3bed..7aa288f5 100755 --- a/plugins/prosody/prosody_ +++ b/plugins/prosody/prosody_ @@ -1,5 +1,4 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- +#!/usr/bin/env python3 # Copyright (c) 2010 Christoph Heer (Christoph.Heer@googlemail.com) # # Permission is hereby granted, free of charge, to any person obtaining a diff --git a/plugins/sphinx/sphindex_ b/plugins/sphinx/sphindex_ index 34c6d4c8..73c3ef17 100755 --- a/plugins/sphinx/sphindex_ +++ b/plugins/sphinx/sphindex_ @@ -1,5 +1,4 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- +#!/usr/bin/env python3 # vim: set fileencoding=utf-8 # # Munin plugin to show number of documents in Sphinx index diff --git a/plugins/synology/snmp__synology b/plugins/synology/snmp__synology index 835ac385..dda582d8 100755 --- a/plugins/synology/snmp__synology +++ b/plugins/synology/snmp__synology @@ -1,5 +1,4 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- +#!/usr/bin/env python3 # Copyright (C) 2014 Johann Schmitz # diff --git a/plugins/weather/weather_press_ b/plugins/weather/weather_press_ index 56569c66..12cc9936 100755 --- a/plugins/weather/weather_press_ +++ b/plugins/weather/weather_press_ @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ munin US NOAA weather plugin (http://tgftp.nws.noaa.gov) @@ -13,7 +13,7 @@ Linux users might need to adjust the shebang. """ import sys -import urllib +from urllib.request import urlopen import re url = 'http://tgftp.nws.noaa.gov/data/observations/metar/decoded/%s.TXT' @@ -36,7 +36,7 @@ elif len(sys.argv) == 2 and sys.argv[1] == "config": print('graph_args --base 1000 -l 850 -u 1050 --rigid') print('graph_scale no') else: - u = urllib.urlopen(url % code) + u = urlopen(url % code) txt = u.read() u.close() diff --git a/plugins/weather/weather_temp_ b/plugins/weather/weather_temp_ index a23840fa..2d28b436 100755 --- a/plugins/weather/weather_temp_ +++ b/plugins/weather/weather_temp_ @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ munin US NOAA weather plugin (http://tgftp.nws.noaa.gov) @@ -13,7 +13,7 @@ Linux users might need to adjust the shebang. """ import sys -import urllib +from urllib.request import urlopen import re url = 'http://tgftp.nws.noaa.gov/data/observations/metar/decoded/%s.TXT' @@ -36,7 +36,7 @@ elif len(sys.argv) == 2 and sys.argv[1] == "config": print('dewpoint.label Dew Point') print('graph_args --base 1000 -l 0') else: - u = urllib.urlopen(url % code) + u = urlopen(url % code) txt = u.read() u.close()