Skip to content

Commit

Permalink
moving the name column to the last position to show full name (#1580)
Browse files Browse the repository at this point in the history
* moving the name column to the last position to show full name

- bug fix: #1579

* add changelog

* update changelog.md

* update CHANGELOG.md

* modify command to find http user

* modify command to find http user
  • Loading branch information
ryandev421 authored and antonmedv committed Apr 18, 2018
1 parent 467969b commit 96f5eda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
## master
[v6.1.0...master](https://github.com/deployphp/deployer/compare/v6.1.0...master)

### Fixed
### Added
- Added cache clear/warmup task for symfony4 recipe [#1575]

### Fixed
- Fixed that long http user name is not detected correctly [#1580]


## v6.1.0
[v6.0.5...v6.1.0](https://github.com/deployphp/deployer/compare/v6.0.5...v6.1.0)
Expand Down Expand Up @@ -363,7 +366,7 @@
- Fixed remove of shared dir on first deploy



[#1580]: https://github.com/deployphp/deployer/pull/1580
[#1575]: https://github.com/deployphp/deployer/pull/1575
[#1559]: https://github.com/deployphp/deployer/pull/1559
[#1557]: https://github.com/deployphp/deployer/pull/1557
Expand Down
2 changes: 1 addition & 1 deletion recipe/deploy/writable.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

if ($httpUser === false && $mode !== 'chmod') {
// Detect http user in process list.
$httpUser = run("ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d ' ' -f1");
$httpUser = run("ps axo comm,user | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | awk '{print $2}'");

This comment has been minimized.

Copy link
@lorisleiva

lorisleiva May 9, 2018

Contributor

This change made me have to set the http_user option locally on my mac.

  • On version 6.1, http_user automatically resolved to loris (my actual username)
  • On version 6.2, http_user automatically resolved to worker

Not sure if that was the expected behaviour but just though I'd mention it.

This comment has been minimized.

Copy link
@antonmedv

antonmedv May 9, 2018

Member

This is strange. Please show output of ps.

This comment has been minimized.

Copy link
@lorisleiva

lorisleiva May 9, 2018

Contributor

Sure.

ps axo comm,user | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1
// nginx: worker pr loris

ps axo comm,user | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | awk '{print $2}'
// worker

ps axo comm,user | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d ' ' -f1
// nginx:

ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d ' ' -f1
// loris

This comment has been minimized.

Copy link
@antonmedv

antonmedv May 9, 2018

Member

nginx: worker pr loris

So, last part should be grepped. Maybe refactor this part.


if (empty($httpUser)) {
throw new \RuntimeException(
Expand Down

0 comments on commit 96f5eda

Please sign in to comment.