-
Notifications
You must be signed in to change notification settings - Fork 68
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
[Feature Request]: Improve "registering" the maintenance.sh script #390
Comments
Sounds good. Have you tried the new option to call the maintenance script with the help of iobroker command? Regards, |
It is, and it either does not check whether the command is executed with uid $ docker exec iobroker-app-1 iob maintenance
This script helps you manage your ioBroker container!
... |
This enhancement is included in v9.1.0-beta.1. Regards, |
Thanks, working as intended. Not sure why the symlink is not set up once in the Dockerfile, though. Does it really need to be re-setup on every start of the container? On top of that, if the symlink already exists from a previous run, setting up the symlink again will fail. Since agross@pi ~
$ ln -s ~/.bashrc ~/foo
agross@pi ~
$ ln -s ~/.bashrc ~/foo
ln: failed to create symbolic link '/home/agross/foo': File exists
agross@pi ~
$ echo $?
1 |
I just noticed that symlinking is guarded by an |
True. The if makes sure this runs only once... The registering of the script is done to the startup procedure because it was the easiest way as this was implemented. 😄 Originally the script was undocumented and just to support my lazy side... It was not planned to make this available for public... I'll put this on my list. It's a good idea to put this into the dockerfile. Regards, |
Done in v9.1.0-beta.2. |
Description / Beschreibung
Instead of registering the maintenance script (
/opt/scripts/maintenance.sh
) as a Bash alias, symlink the script to/bin
(in all variants likem
,maint
,maintenance
).Why?
docker exec <iob-container> maint
yields"maint": executable file not found in $PATH
docker exec -t <iob-container> bash -ic maint
By symlinking the executable to e.g.
/bin/maint
in the Dockerfile running the maintenance script becomes trivial:The text was updated successfully, but these errors were encountered: