I'm on Kali Linux with
Linux kali 4.19.0-kali5-amd64 #1 SMP Debian 4.19.37-6kali1 (2019-07-22) x86_64 GNU/LINUX
Trying to execute
adjust_timezone.sh placed in
#!/bin/sh echo "Adjusting timezone..."; ntpdate in.pool.ntp.org;
The output of
I tried using the full path in the script too, no success.
The content of
SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin @reboot /usr/local/startup_scripts/adjust_timezone.sh
Added the same using
crontab -e too
I tried using
@reboot : /usr/local/startup_scripts/adjust_timezone.sh too with no success.
I modified the script adding
2>&1 >> log.txt but the log is empty, i think the script is never executing.
Where I'm wrong? Any advice?
As suggested the logging format was wrong, i changed it in
>> /log.txt 2>&1 and here's the result :
/usr/local/startup_scripts/adjust_timezone.sh: 3: ntpdate: not found Error resolving in.pool.ntp.org: Name or service not known (-2) 20 Aug 15:14:37 ntpdate: Can't find host in.pool.ntp.org: Name or service not known (-2) 20 Aug 15:14:37 ntpdate: no servers can be used, exiting