San103 / LinuxScriptCurrentDate

executable file for setting current date to local machine based on API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Linux script - setting date based in online API manila timezone

FOr those machine that time resets often without any reason every boot

setTime.sh

Prerequisite Packages

must have these packages in your machine

If the output is the right date and time , change the 'utc.date' to 'datetime' For Arch Linux based, install these following, by default curl is already installed

sudo pacman -S curl
sudo pacman -S jq

Run the script in terminal, simply go to directory of the file and type the filename 'setTime.sh'

To run the script automatically when start up or boot

visit this article, recommend to use system.d
https://www.baeldung.com/linux/run-script-on-startup
sudo chmod -x setTime.sh

RUN the script by

./setTime.sh

About

executable file for setting current date to local machine based on API


Languages

Language:Shell 100.0%