Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
provision
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
provision
Commits
3ec592ae
Commit
3ec592ae
authored
Feb 23, 2017
by
helmo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2851478
: Move symlink code up two levels to Provision_Service
parent
71ec853d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
19 deletions
+19
-19
Provision/Service.php
Provision/Service.php
+19
-0
http/Provision/Service/http/public.php
http/Provision/Service/http/public.php
+0
-19
No files found.
Provision/Service.php
View file @
3ec592ae
...
...
@@ -336,4 +336,23 @@ class Provision_Service extends Provision_ChainedState {
static
function
option_documentation
()
{
return
array
();
}
/**
* Save symlink for this server from /var/aegir/config/APPLICATION_NAME.conf -> /var/aegir/config/SERVER/APPLICATION_NAME.conf
*/
function
symlink_service
()
{
$file
=
$this
->
application_name
.
'.conf'
;
// We link the app_name.conf file on the remote server to the right version.
$cmd
=
sprintf
(
'ln -sf %s %s'
,
escapeshellarg
(
$this
->
server
->
config_path
.
'/'
.
$file
),
escapeshellarg
(
$this
->
server
->
aegir_root
.
'/config/'
.
$file
)
);
if
(
$this
->
server
->
shell_exec
(
$cmd
))
{
drush_log
(
dt
(
"Created symlink for %file on %server"
,
array
(
'%file'
=>
$file
,
'%server'
=>
$this
->
server
->
remote_host
,
)));
};
}
}
http/Provision/Service/http/public.php
View file @
3ec592ae
...
...
@@ -61,25 +61,6 @@ class Provision_Service_http_public extends Provision_Service_http {
$this
->
symlink_service
();
}
}
/**
* Save symlink for this server from /var/aegir/config/APPLICATION_NAME.conf -> /var/aegir/config/SERVER/APPLICATION_NAME.conf
*/
function
symlink_service
()
{
$file
=
$this
->
application_name
.
'.conf'
;
// We link the app_name.conf file on the remote server to the right version.
$cmd
=
sprintf
(
'ln -sf %s %s'
,
escapeshellarg
(
$this
->
server
->
config_path
.
'/'
.
$file
),
escapeshellarg
(
$this
->
server
->
aegir_root
.
'/config/'
.
$file
)
);
if
(
$this
->
server
->
shell_exec
(
$cmd
))
{
drush_log
(
dt
(
"Created symlink for %file on %server"
,
array
(
'%file'
=>
$file
,
'%server'
=>
$this
->
server
->
remote_host
,
)));
};
}
static
function
option_documentation
()
{
return
array
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment