Rudolf-Barbu / Ward

Server dashboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ward does not remember its settings

plague-doctor opened this issue · comments

I have created a little systemd ward.service:

[Unit]
Description=Minimalistic server monitoring tool.

[Service]
WorkingDirectory=/opt/ward
ExecStart=/usr/bin/java -Xms128m -Xmx256m -jar ward.jar
Type=fork
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

When I start it for the first time, the Ward creates /opt/ward/settings.ini:

[setup]
serverName = server-name
theme = light
port = 4001

And starts to serve on port :4001 - all fine and dandy.
However, once restarted, it throws:

INFO 2781 --- [main] org.bsoftware.ward.Ward : No active profile set, falling back to default profiles: default

and the play begins again on port :4000.

How can one force using the new profile?

I guess you restarting the app by this lines Restart=on-failure RestartSec=10. It;s normal behaviour, cause once app started it ask you to fill port number and etc data. It is made like this, because people may want reconfigure app, so every restart will show you setup page. Next release i will make something like remember settings checkbox. For now you should just not to restart application.

A quick reply :-) Thanks.

Restart=on-failure
RestartSec=10

it is for a self healing mechanism.

I was testing how it behaves when the server needs to be rebooted and have noticed it was reverting every time to the defaults. Which is very annoying in my case. I've got too many raspberry pies running to do the re-configuration dance every single time the Pi reboots.
I will wait for you to release the new Ward with persistent configuration. That will be a good day :-)

Thanks a lot for Ward. It is a very nice 'lil tool 👍

I will try release this feature tomorrow.

Done. Try 1.7.1