zerenx
-
Posts
12 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Store
Gallery
Bug Reports
Documentation
Landing
Posts posted by zerenx
-
-
Indonesia? Half expected my country won't make it to the list
[Plugin] CA User Scripts
in Plugin Support
Posted
A quick report of a possible bug
I am using Unraid v6.9.2 with CA Userscripts v2021.03.10
when running a script that references the home directory using '~'
If I run it in foreground (ie. click the "RUN SCRIPT" button) it runs OK
but it refuses to run if I do it in the background (ie. click the "RUN IN BACKGROUND" button)
I investigated a little, and it seems that when running in background, the script forgot to set the proper home directory.
I checked it with this simple script
#!/bin/bash set | grep HOME
and the result if I run it in foreground is
HOME=/root
while the result if I run it in background is
HOME=/
For the moment, this can be easily fixed with adding this line inside the script
export HOME=/root
I am not sure if this is intentional or a bug, hope that helps.