-
Notifications
You must be signed in to change notification settings - Fork 39
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
🚑 Fix shutdown addon command #369
Conversation
WalkthroughThe Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- nut/rootfs/etc/cont-init.d/nut.sh (1 hunks)
Additional context used
Shellcheck
nut/rootfs/etc/cont-init.d/nut.sh
[error] 1-1: This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify. (SC1008)
Additional comments not posted (3)
nut/rootfs/etc/cont-init.d/nut.sh (3)
117-117
: Update to shutdown command is appropriate.
The update to use/run/s6/basedir/bin/halt
aligns with the described changes in the S6 overlay system. This should ensure the shutdown command functions as expected.
118-120
: Conditional logic for shutdown command is clear and effective.
The use ofbashio::config.true 'shutdown_host'
to conditionally change theshutdowncmd
to"/usr/bin/shutdownhost"
is a good approach. It provides flexibility based on the configuration and ensures that the appropriate action is taken based on the host's needs.
Line range hint
1-1
: Shebang might not be recognized by some tools.
The shebang used (#!/command/with-contenv bashio
) is specific to the Hass.io environment and might not be recognized by standard tools like ShellCheck. Consider adding a comment explaining this for clarity and future maintenance.
Proposed Changes
Fix addon shutdown command, likely due to changes in S6 no longer functions, this aligns with the tear down commands within the service runs.
Summary by CodeRabbit
shutdown_host
is true, improving shutdown reliability.