command line set of Language and Theme?

oneobserver

Joined
Jun 2, 2008
Messages
64
Likes
0
Points
0
#1
I am building a setup script that takes a bunch of parameters and auto-configures a system and have run into a bit of a snag. Two of the things that I need to set are the Theme and the Language for the system as it is built. I looked through the code and the databases and it appeared that all I had to do was set the language and the theme values in /var/www/db/settings.db. When I do that, it appears to need at least one or two more steps. Setting the language appears to work OK, except for causing my secondary problem. Setting the Theme changes the colors, but not the icons, and also causes my secondary problem. The secondary problem is when I make ANY change to the settings.db values, the menus go away on the PBX tab. All you get are grey lines with no words in them.

Does somebody have a clean way to make those two changes from a shell script?

The method that I am using right now is in a shell script I use the following code:

#
# Fix the Theme
( cat << EOJ
BEGIN TRANSACTION;
update "settings" set value='en' where key='language';
update "settings" set value='giox' where key='theme';
COMMIT;
.exit
EOJ
) | sqlite3 /var/www/db/settings.db

When you run that code the values in the database get changed, but you have to "Change" the theme to get the icons to change, and menus disappear on the PBX tab. You can eliminate either update line and the menus still disappear, and reapplying a different theme or language through the interface didn't appear to bring them back (besides being a little self defeating of the process). That same method works fine for adding default users, groups and group settings in acl.db

Any suggestions?

markh
 

oneobserver

Joined
Jun 2, 2008
Messages
64
Likes
0
Points
0
#2
OK, Found the issue with the menus and fixed it. Apparently the language files changed slightly between 1.1 Beta and 1.1 Stable, and I was working with a customized language file. Once I reconverted a 1.1 Stable file over the menus came back. Still looking for a way to get the icons in the theme to apply without having to reapply them in the interface.

Any Suggestions?

markh
 

oneobserver

Joined
Jun 2, 2008
Messages
64
Likes
0
Points
0
#3
As I extended these scripts, I made the problem go away, but not sure exactly how. Bottom line is the problem is resolved.
 

Members online

Latest posts

Forum statistics

Threads
30,902
Messages
130,886
Members
17,563
Latest member
dineshr
Top