mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-17 04:56:21 +00:00
parent
36cf199548
commit
aa3cbc209e
1 changed files with 12 additions and 0 deletions
12
app/models/deploy_localized_domain.rb
Normal file
12
app/models/deploy_localized_domain.rb
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# Soportar dominios localizados
|
||||||
|
class DeployLocalizedDomain < DeployAlternativeDomain
|
||||||
|
store :values, accessors: %i[hostname locale], coder: JSON
|
||||||
|
|
||||||
|
# Generar un link simbólico del sitio principal al alternativo
|
||||||
|
def deploy
|
||||||
|
File.symlink?(destination) ||
|
||||||
|
File.symlink(File.join(site.hostname, locale), destination).zero?
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue