cybozu-go / aptutil

Go utilities for Debian APT repositories
MIT License
127 stars 30 forks source link

[cacher] Documentation - reload of config file #10

Closed xipmix closed 8 years ago

xipmix commented 8 years ago

I have been looking into writing a systemd unit file for this. One thing that came up was reloading the configuration file after it has been modified. USAGE.md says "go-apt-cacher reads a configuration file at start up."

My question is: after a change to the configuration file, does go-apt-cacher notice the file has been updated and automatically reread it?

Or does one need to restart the service, ie kill the existing process and start it again?

xipmix commented 8 years ago

After some experiments, my suggested patch:

index cbf4eb0..5cd682e 100644
--- a/cmd/go-apt-cacher/USAGE.md
+++ b/cmd/go-apt-cacher/USAGE.md
@@ -5,6 +5,7 @@ Configuration
 -------------

 go-apt-cacher reads a configuration file at start up.
+If you change the configuration file, the change will not take effect until you restart go-apt-cacher.
 The default location of the file is `/etc/go-apt-cacher.toml`.

 A sample [TOML][] file is available [here](go-apt-cacher.toml).
ymmt2005 commented 8 years ago

You are right, and thanks a lot for your suggestion! I will update the usage later.