Closed antonmedv closed 2 days ago
I think it's not a complete solution to only warn users about it. If Motd cannot be removed from server, DeployerV7 seems to be not usable. Maybe Deployer can detect Motd and before each remote command, filter result to remove it.
Yes, this is also possible. Let’s implement it as well. For example as configurable regexp.
Configurable Regexp seems to be a good idea and the most powerful solution.
The Hostinger Motd contains static and dynamic parts.
HHHH HHHH
HHHHHHHH HHHHHHHH
HHHHHHHH HHHHHHHH
HHHHHHHH HHHHHHHH
HHHHHHHHHHHHHHHHHHHH HHHHH
HHHHHHHHHHHHHHHHHHHHHHHHH
HHHHHHHHHHHHHHHHHHHHHHHHH
HHHH HHHHHHHHHHHHHHHHHHHHH
HHHHHHHH HHHHHHHH
HHHHHHHH HHHHHHHH
HHHHHHHH HHHHHHHH
HHHH HHHH
Welcome back! The time now is 17:14 UTC
Server load: 15.51, 16.41, 16.67
Link to hPanel:
https://hpanel.hostinger.com/
Maybe create a list of predefined motd for popular services?
Do you use ssh multiplexing?
Yes, i use ssh multiplexing because it's the default value of Deployer option. But i try to deactivate it, and there is no difference.
I'm trying to deploy a classical CakePhp4 WebApp, the task tree is a basic case.
The task-tree for deploy:
└── deploy
├── deploy:prepare
│ ├── deploy:info
│ ├── deploy:setup
│ ├── deploy:lock
│ ├── deploy:release
│ ├── deploy:update_code
│ ├── deploy:shared
│ └── deploy:writable
├── deploy:vendors
├── deploy:init
├── deploy:run_migrations
└── deploy:publish
├── deploy:symlink
├── deploy:unlock
├── deploy:cleanup
I try each task individually until the update_code task and there is no problem with motd.
I discover deployerV7 since couple days, i use it since the V4 and next version, the motd never produce problem.
I am running into this issue when using the test()
function, it's messing up the results and returning false every time.
We just upgraded some projects (yeah really delayed) and hit this. Oddly while the spammed MOTD over n over was annoying in older versions - it still worked.
It seems after some investigation that after this commit - https://github.com/deployphp/deployer/commit/da8bb1adffab871c94305c47d34beb10ac2c51da, it broke.
Since it would get stuck an infinite loop. I doubt I'll have any luck, but I requested our client to ask if Hostinger can remove the MOTD as its quite annoying and doesn't look configurable in my research.
HHHH HHHH
HHHHHHHH HHHHHHHH
HHHHHHHH HHHHHHHH
HHHHHHHH HHHHHHHH
HHHHHHHHHHHHHHHHHHHH HHHHH
HHHHHHHHHHHHHHHHHHHHHHHHH
HHHHHHHHHHHHHHHHHHHHHHHHH
HHHH HHHHHHHHHHHHHHHHHHHHH
HHHHHHHH HHHHHHHH
HHHHHHHH HHHHHHHH
HHHHHHHH HHHHHHHH
HHHH HHHH
Welcome back! The time now is 18:32 UTC
Server load: 19.28, 19.43, 20.37
Link to hPanel:
https://hpanel.hostinger.com/
Okay, we fixed without code changes. Explained below. In short though - I wish clients didn't use Hostinger and used a solution that is more in-tune with hosting Laravel. So with that rant out of the way.
The name of the game is setting up values ahead of time.
# You must set `git` yourself, otherwise the MOTD will meld with command and lead to crash.
set('bin/git', '/usr/bin/git');
# Hostinger default php version is 8.0, you probably don't want that.
set('bin/php', '/opt/cloudlinux/alt-php82/root/usr/bin/php');
# Hostinger default composer is composer1, wtf seriously. We must invoke composer2 with the php version we want from above
set('bin/composer', '/opt/cloudlinux/alt-php82/root/usr/bin/php /usr/local/bin/composer2');
# We must remove the login shell to hide the MOTD. This is important.
set('shell', 'bash');
# Hostinger won't allow ACL changes, use chmod
set('writable_mode', 'chmod');
# Hardcode user/group that you need because Hostinger won't expose that in ps aux
set('http_user', 'uXXX');
set('http_group', 'oXXX');
This issue has been automatically closed. Please, open a discussion for bug reports and feature requests.
Read more: [https://github.com/deployphp/deployer/discussions/3888]
YAML
Here is the error
Here is the fix
/etc/profile.d/serverpilot-login-message.sh
Originally posted by @pryley in https://github.com/deployphp/deployer/discussions/2542
Upvote & Fund