RaspiPass
RaspiPass copied to clipboard
Need to be able to set timezone/locale from within WebGUI
According to this link it can be done using the --frontend=noninteractive parameter on dpkg-reconfigure command
To implement I will need to:
- Gather a list of locales (/usr/share/zoneinfo for areas; /user/share/zoneinfo/[area] for specific zone)
- Allow one to be selected from a drop-down within the Web GUI (probably two drop-downs.. one for area, one for zones populated from selected area)
- Create a symbolic link /etc/localtime linking to the /usr/share/zoneinfo/[area]/[zone] file
- Run dpkg-reconfigure --frontend=noninteractive tzdata
Method:
- Create new tab ("system config"? rename "configuration" to "RaspiPass config")
- Store directory listing under /usr/share/zoneinfo as array of areas/zones
- Populate drop-down boxes with areas
- When area is selected, populate second drop-down with zones
- Run dpkg-reconfigure as above
Added backend retrieval of directories under /usr/share/zoneinfo, and files within those directories. These are added to an array for selection from a (yet-to-be-added) drop-down. Externally called from html/scripts/locales.php
Currently testing on working branch
Added drop-down and call to external script - just need to write the script to set timezone now
EDIT: Script written
Written and in testing on working tree