main
David Vargas 2022-12-02 08:26:31 +00:00
parent b6eec80060
commit b1596c5571
4 changed files with 33 additions and 33 deletions

View File

@ -16,38 +16,40 @@ class Educatic
output = [] output = []
todo = value['todo'] || [] todo = value['todo'] || []
cmd = "host #{value['ip']}| grep #{value['hostname']}| wc -l" check_hostname(value, output: output, todo: todo)
counter = %x[#{cmd}].to_i
if counter.zero?
output << " Check this:"
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? unless value['todo'].nil?
output << " TODO:"
todo.each_with_index do |line, index| todo.each_with_index do |line, index|
output << " #{index + 1}. #{line}" output << " #{index + 1}. #{line}"
end end
end end
unless output.size.zero? unless output.size.zero?
puts "==> #{key} [#{value['hetzner']}]" puts "==> [Hetzner #{value['hetzner'].upcase}] #{key}"
puts output.join("\n") puts output.join("\n")
end end
end end
end end
def urls def show_urls
@services.each_pair do |key, value| @services.each_pair do |key, value|
puts "#{key.rjust(16)} : #{value['hostname']}" puts "#{key.rjust(16)} : #{value['hostname']}"
end end
end end
private
def check_hostname(value, output:, todo:)
cmd = "host #{value['ip']}| grep #{value['hostname']}| wc -l"
counter = %x[#{cmd}].to_i
if counter.zero?
output << " Check this:"
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
end
end end

View File

@ -7,6 +7,7 @@ services:
- Se propone eliminar la MV o... - Se propone eliminar la MV o...
- Cambiar http por https - Cambiar http por https
nextcloud: nextcloud:
main: true
hetzner: docus hetzner: docus
hostname: docs.txs.es hostname: docs.txs.es
ip: 78.47.40.72 ip: 78.47.40.72
@ -88,14 +89,17 @@ services:
encanarias: encanarias:
hetzner: social hetzner: social
hostname: encanarias.info hostname: encanarias.info
ip: 78.47.122.22 ip: 5.75.226.229
desc: Diaspora viejo. Red social desc: Diaspora viejo. Red social
old:
ip: 78.47.122.22
bbbold: bbbold:
hetzner: ull hetzner: ull
hostname: static.19.113.69.159.clients.your-server.de hostname: static.19.113.69.159.clients.your-server.de
ip: 159.69.113.19 ip: 159.69.113.19
desc: BBB desc: BBB
bbb: bbb:
main: true
hetzner: ull hetzner: ull
hostname: bbb.educar.encanarias.info hostname: bbb.educar.encanarias.info
ip: 49.12.216.60 ip: 49.12.216.60
@ -107,6 +111,7 @@ services:
todo: todo:
- Había que eliminar esta MV - Había que eliminar esta MV
mattermost: mattermost:
main: true
hetzner: ull hetzner: ull
hostname: colabora.txs.es hostname: colabora.txs.es
ip: 159.69.179.155 ip: 159.69.179.155

View File

@ -3,4 +3,4 @@
require_relative "lib/educatic" require_relative "lib/educatic"
filename = File.join(File.dirname(__FILE__), "services.yaml") filename = File.join(File.dirname(__FILE__), "services.yaml")
Educatic.new(filename).urls Educatic.new(filename).show_urls

View File

@ -1,27 +1,20 @@
==> mini [docus] ==> [Hetzner DOCUS] mini
TODO:
1. Se propone eliminar la MV o... 1. Se propone eliminar la MV o...
2. Cambiar http por https 2. Cambiar http por https
3. Cambiar <editor.educar.encanarias.info> el dominio @txs.es 3. Cambiar <editor.educar.encanarias.info> el dominio @txs.es
==> editorcollab [docus] ==> [Hetzner DOCUS] editorcollab
TODO:
1. Se muestra la página por defecto de Apache2 1. Se muestra la página por defecto de Apache2
2. No parece estar funcionando 2. No parece estar funcionando
==> mailu19 [txs] ==> [Hetzner TXS] mailu19
TODO:
1. Se propone eliminar la MV o... 1. Se propone eliminar la MV o...
2. Cambiar <static.18.144.90.157.clients.your-server.de> el dominio @txs.es 2. Cambiar <static.18.144.90.157.clients.your-server.de> el dominio @txs.es
==> pixel [social] ==> [Hetzner SOCIAL] pixel
TODO:
1. Se propone eliminar esta MV 1. Se propone eliminar esta MV
==> blogs [social] ==> [Hetzner SOCIAL] blogs
TODO:
1. Intento de montar <diaspora> 1. Intento de montar <diaspora>
==> txs [social] ==> [Hetzner SOCIAL] txs
TODO:
1. Se propone eliminar la MV o... 1. Se propone eliminar la MV o...
2. Duda: Esto no parece ser Mastodon! 2. Duda: Esto no parece ser Mastodon!
3. Cambiar <static.192.237.46.78.clients.your-server.de> el dominio @txs.es 3. Cambiar <static.192.237.46.78.clients.your-server.de> el dominio @txs.es
==> cryptpad [ull] ==> [Hetzner ULL] cryptpad
TODO:
1. Había que eliminar esta MV 1. Había que eliminar esta MV