diff --git a/bin/check.rb b/bin/check.rb index d0d0324..2c1b98b 100755 --- a/bin/check.rb +++ b/bin/check.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -require_relative "educatic" +require_relative "lib/educatic" filename = File.join(File.dirname(__FILE__), "services.yaml") Educatic.new(filename).check diff --git a/bin/lib/educatic.rb b/bin/lib/educatic.rb index 6a96187..2c9c9f0 100644 --- a/bin/lib/educatic.rb +++ b/bin/lib/educatic.rb @@ -14,6 +14,7 @@ class Educatic def check @services.each_pair do |key, value| output = [] + todo = value['todo'] || [] cmd = "host #{value['ip']}| grep #{value['hostname']}| wc -l" counter = %x[#{cmd}].to_i @@ -22,9 +23,17 @@ class Educatic output << " * hostname = #{value['hostname']}" output << " * ip = #{value['ip']}" end + if (value['hostname'].end_with? ".info" or value['hostname'].end_with? "clients.your-server.de") + todo << "Cambiar <#{value['hostname']}> el dominio @txs.es" + end + + if value['hostname'].start_with? "staticeducar.info" + todo << "Cambiar <#{value['hostname']}> el dominio @txs.es" + end + unless value['todo'].nil? output << " TODO:" - value['todo'].each_with_index do |line, index| + todo.each_with_index do |line, index| output << " #{index + 1}. #{line}" end end diff --git a/bin/services.yaml b/bin/services.yaml index f579230..72c6754 100644 --- a/bin/services.yaml +++ b/bin/services.yaml @@ -6,7 +6,6 @@ services: todo: - Se propone eliminar la MV o... - Cambiar http por https - - Cambiar dominio a nextcloud: hetzner: docus hostname: docs.txs.es @@ -32,7 +31,6 @@ services: ip: 157.90.144.18 todo: - Se propone eliminar la MV o... - - Cambiar a <*.txs.es> jekyll-www: state: revise hetzner: txs @@ -69,15 +67,11 @@ services: hostname: tuvideo.encanarias.info ip: 116.203.254.222 desc: Peertube - todo: - - Cambiar dominio de a micanal: hetzner: social hostname: micanal.encanarias.info ip: 188.34.188.55 desc: Peertubte - todo: - - Cambiar dominio de a txs: hetzner: social hostname: static.192.237.46.78.clients.your-server.de @@ -85,7 +79,6 @@ services: desc: Mastodon? todo: - Se propone eliminar la MV o... - - Cambiar a <*.txs.es> - "Duda: Esto no parece ser Mastodon!" xmpp.txs.es: hetzner: social @@ -97,22 +90,16 @@ services: hostname: encanarias.info ip: 78.47.122.22 desc: Diaspora viejo. Red social - todo: - - Dominio antiguo bbbold: hetzner: ull hostname: static.19.113.69.159.clients.your-server.de ip: 159.69.113.19 desc: BBB - todo: - - Cambiar a <*.txs.es> bbb: hetzner: ull hostname: bbb.educar.encanarias.info ip: 49.12.216.60 desc: BBB - todo: - - Dominio antiguo cryptpad: hetzner: ull hostname: cryptpad.txs.es diff --git a/bin/urls.rb b/bin/urls.rb index a102631..0863619 100755 --- a/bin/urls.rb +++ b/bin/urls.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -require_relative "educatic" +require_relative "lib/educatic" filename = File.join(File.dirname(__FILE__), "services.yaml") Educatic.new(filename).urls