File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
src/plugins/terminal/scripts Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 1-
2-
31export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/share/bin:/usr/share/sbin:/usr/local/bin:/usr/local/sbin:/system/bin:/system/xbin:$PREFIX /local/bin
42export PS1=" \[\e[38;5;46m\]\u\[\033[39m\]@localhost \[\033[39m\]\w \[\033[0m\]\\ $ "
53export HOME=/home
64export TERM=xterm-256color
75
86
9- required_packages=" bash command-not-found"
7+ required_packages=" bash command-not-found tzdata wget "
108missing_packages=" "
119
1210for pkg in $required_packages ; do
3331
3432
3533if [ " $1 " = " --installing" ]; then
34+ echo " Configuring timezone..."
35+
36+ # Fetch timezone using wget
37+ TZ=$( wget -qO- https://ipapi.co/timezone)
38+
39+ if [ -n " $TZ " ] && [ -f " /usr/share/zoneinfo/$TZ " ]; then
40+ ln -sf " /usr/share/zoneinfo/$TZ " /etc/localtime
41+ echo " $TZ " > /etc/timezone
42+ echo " Timezone set to: $TZ "
43+ else
44+ echo " Failed to detect timezone"
45+ fi
46+
3647 mkdir -p " $PREFIX /.configured"
3748 echo " Installation completed."
3849 exit 0
118129chmod +x " $PREFIX /alpine/initrc"
119130
120131# actual souce
132+ # everytime a terminal is started initrc will run
121133" $PREFIX /axs" -c " bash --rcfile /initrc -i"
122134
123135else
You can’t perform that action at this time.
0 commit comments