ocserv: regenerate the password file on reload
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 8 Jun 2014 09:02:28 +0000 (11:02 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 8 Jun 2014 09:31:12 +0000 (11:31 +0200)
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
net/ocserv/files/ocserv.init

index 87307dcf2e3d3ed6ddd1bca475c459d3fad66bf5..3dfcd0fc69e6f2733d02eb59930eb4d9627087ab 100644 (file)
@@ -182,6 +182,11 @@ stop() {
 }
        
 reload() {
+       rm -f /var/etc/ocpasswd
+       touch /var/etc/ocpasswd
+       chmod 600 /var/etc/ocpasswd
+       config_foreach setup_users ocservusers
+
        /usr/bin/occtl show status >/dev/null 2>&1
        if test $? != 0;then
                start