mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
made script auto switch between Boston/Nashville
This commit is contained in:
parent
76c7616eab
commit
c27cf2b535
@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
ln -sf /usr/share/zoneinfo/US/Central /etc/localtime
|
|
||||||
|
|
||||||
15
.local/bin/change_timezones
Executable file
15
.local/bin/change_timezones
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
tz=$(date "+"%Z")
|
||||||
|
|
||||||
|
if (( $EUID != 0 )); then
|
||||||
|
echo "Please run as root"
|
||||||
|
exit
|
||||||
|
elif [[ "$tz" == "CDT" ]]; then
|
||||||
|
echo "Changing to Eastern Daylight Time timezone"
|
||||||
|
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
|
||||||
|
elif [[ "$tz" == "EDT" ]]; then
|
||||||
|
echo "Changing to Central timezone"
|
||||||
|
ln -sf /usr/share/zoneinfo/US/Central /etc/localtime
|
||||||
|
fi
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user