When running from crontab, I fail having faup to works as expected
I have this test script that use 2 ways to call faup (with full path)
#!/bin/bash -x
echo "----Start"
echo ""
echo "-- 1 --"
echo "www.github.com" | /bin/faup
echo $?
echo ""
echo "-- 2 --"
/bin/faup www.github.com
echo $?
echo ""
echo "----End"
When running not from cron, i have expected results:
+ echo ----Start
----Start
+ echo ''
+ echo '-- 1 --'
-- 1 --
+ echo www.github.com
+ /bin/faup
,,www,github.com,github,www.github.com,com,,,,,mozilla_tld
+ echo 0
0
+ echo ''
+ echo '-- 2 --'
-- 2 --
+ /bin/faup www.github.com
,,www,github.com,github,www.github.com,com,,,,,mozilla_tld
+ echo 0
0
+ echo ''
+ echo ----End
----End
When this script is called from crontab, the first command works fine, but the 2nd command does not create output
* 12 * * * /aaa/toto.sh > /tmp/tototo
----Start
-- 1 --
,,www,github.com,github,www.github.com,com,,,,,mozilla_tld
0
-- 2 --
0
----End
+ echo ----Start
+ echo ''
+ echo '-- 1 --'
+ echo www.github.com
+ /bin/faup
+ echo 0
+ echo ''
+ echo '-- 2 --'
+ /bin/faup www.github.com
+ echo 0
+ echo ''
+ echo ----End
/bin/faup -v
faup v1.6
FAUP_DATA_DIR=/usr/local/share/faup/
TLD file being used:/usr/local/share/faup/mozilla.tlds
I should admit I'm quite confused on why the first command works, but not the other one, only when running from cron.
I tried to also change the env variables to match those when run from my user.. but no luck...
I tried on 2 different systems. Does someone reproduce same issue ? And/or have some clue on what I'm possibly doing wrong ?
Thank's
When running from crontab, I fail having faup to works as expected
I have this test script that use 2 ways to call faup (with full path)
When running not from cron, i have expected results:
When this script is called from crontab, the first command works fine, but the 2nd command does not create output
I should admit I'm quite confused on why the first command works, but not the other one, only when running from cron.
I tried to also change the env variables to match those when run from my user.. but no luck...
I tried on 2 different systems. Does someone reproduce same issue ? And/or have some clue on what I'm possibly doing wrong ?
Thank's