Post Reply 
Feature Request: Re-Scan/inotify
26-04-2012, 17:00
Post: #10
RE: Feature Request: Re-Scan/inotify
(26-04-2012 16:29)KoS Wrote:  in the meantime i've now used a small expect script to do the restart :-)
Code:
#!/usr/bin/expect
spawn java -jar /opt/minimserver/lib/minimwatch.jar
sleep 5
send "restart\n"
sleep 3
send "exit\n"

Thanks for the pointer to 'expect'. I wan't aware of this. Unfortunately it's not available on my NAS. Sad

Quote:
Quote:It would be possible to extend MinimWatch to allow it to select a specific MinimServer instance (based on the displayName). With this, you'd need to use a command string like:
Code:
echo -e "sleep 5\nselect server1\nrestart\nsleep 10\nexit" | java -jar /opt/minimserver/lib/minimwatch.jar
that would be the perfect combination/extension. or something like "select local1" or so... if somebody has an minim server running on the network too, i wouldn't be happy to restart his one ;-)

In this example, "server1" was an example of a displayName. You can set a different displayName for each instance of MinimServer, which is displayed by the control point. You'd need to use the same displayName that you assigned to your local server, and make sure that there isn't another instance of MinimServer with that displayName running on your network.

It would be possible to so something special for local instances of MinimServer, but this would have to cope with multiple local instances (each with their own displayName), so I prefer the simple approach that uses displayName for both the local and remote case.

Quote:hmm.. haven't realized the problem with the SIGHUP when exiting from a shell. you could use instead another signal for the restart of the daemon, e.g. SIGUSR1 or SIGUSR2 ?

That's a good idea, though I'd need to be careful not to confict with the use of these signals for other purposes, such as controlling LinuxThreads. I think the best approach would be to make the choice of 'reload' signal configurable, so that people could choose a signal that doesn't conflict with other usage in their environment.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread

Forum Jump:


User(s) browsing this thread: 1 Guest(s)