Zirius New member Messages 261 Points 0 Jan 24, 2015 #2 Hello! At is seems, my server's time is off by 4mins, now I have to run: sudo ntpdate ntp.pagasa.dost.gov.ph everytime I reboot, which sometimes I forgot to run, is there a way that command be run immediately after startup? thanks!
Hello! At is seems, my server's time is off by 4mins, now I have to run: sudo ntpdate ntp.pagasa.dost.gov.ph everytime I reboot, which sometimes I forgot to run, is there a way that command be run immediately after startup? thanks!
milk New member Messages 91 Points 0 Location /dev/urandom Emulator Jan 25, 2015 #3 my-super-script.sh #!/bin/bash/usr/sbin/ntpdate ntp.pagasa.dost.gov.ph put it into /etc/init.d folder: mv my-super-script.sh /etc/init.d/ Set it executable: chmod +x /etc/init.d/my-super-script.sh Create symlink to /etc/rc.d folder Code: ln -s /etc/init.d/my-super-script.sh /etc/rc.d/
my-super-script.sh #!/bin/bash/usr/sbin/ntpdate ntp.pagasa.dost.gov.ph put it into /etc/init.d folder: mv my-super-script.sh /etc/init.d/ Set it executable: chmod +x /etc/init.d/my-super-script.sh Create symlink to /etc/rc.d folder Code: ln -s /etc/init.d/my-super-script.sh /etc/rc.d/