Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MOTD dynamically #1267

Closed

Conversation

akhdanfadh
Copy link

✍️ Description

This PR modifies the default install.func (debian/ubuntu) to implement a dynamic Message of the Day (MOTD) replacing the static one.


🛠️ Type of Change

Please check the relevant options:

  • Bug fix (non-breaking change that resolves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change unexpectedly)
  • New script (a fully functional and thoroughly tested script or set of scripts)

✅ Prerequisites

The following steps must be completed for the pull request to be considered:

  • Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.)
  • Testing performed (I have thoroughly tested my changes and verified expected functionality.) --> Have tested it on existing LXC but not a new one.
  • Documentation updated (I have updated any relevant documentation)

📋 Additional Information

I have modified the alpine one (alpine-install.func), but waiting for this PR if needed or not.

@akhdanfadh akhdanfadh requested a review from a team as a code owner January 5, 2025 16:50
@github-actions github-actions bot added the high risk A change that can affect many scripts label Jan 5, 2025
# Get the current private IP address
IP=$(hostname -I | awk '{print $1}') # Private IP
# Create our dynamic MOTD script
MOTD_FILE="/etc/update-motd.d/01-proxmox-tteck"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why tteck?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well no reason TBH, just to maintain legacy and maybe an indication that this file was made by the script. Let me know if you prefer other name.

@MickLesk
Copy link
Member

MickLesk commented Jan 5, 2025

Whats the Change ?

@akhdanfadh
Copy link
Author

Whats the Change ?

I'm sorry if it's not clear enough. I modify the script to, instead creating static MOTD, it will create a dynamic MOTD script file. This is particularly useful to reflect IP changes, like if you set DHCP static mappings for the new LXC/VM after creating them.

@michelroegl-brunner
Copy link
Member

Duplicate of #1216 and also misses alpine-install.func

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high risk A change that can affect many scripts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants