Re: Client history

Peter Davis via Openvpn-users <[email protected]>
Newsgroups gmane.network.openvpn.user
Message-ID <a-asZ4EdlvXkmVZVDflQGZJhaPHXfCh6wACpjJiWQS6iibY0ybNWQpeMiigSlwxX235dnou8A-ONLdh8cxb8uA_SkYYcwDkNbMBa2-7opLg=@proton.me>
> On Friday, February 23rd, 2024 at 4:39 PM, Bo Berglund <[email protected]> wrote:

> On Fri, 23 Feb 2024 13:24:36 +0100, Gert Doering [email protected] wrote:
> 
> > I think at this point you need to familiarize yourself with shell
> > scripting to ensure that script is well-behaved.
> 
> 
> And using shellcheck <scriptfile> after editing/creating a script file also
> 
> helps in getting rid of syntax errors etc...
> 
> "sudo apt install shellcheck" if you do not already have it installed...
> 
> 
> --
> Bo Berglund
> Developer in Sweden
> 
> 
> 
> _______________________________________________
> Openvpn-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/openvpn-users

Hello,
I installed shellcheck and result is:

# shellcheck script-events.sh

In script-events.sh line 14:
if [[ "$script_type" == "client-connect" ]]; then
       ^----------^ SC2154 (warning): script_type is referenced but not assigned.


In script-events.sh line 15:
    echo "$LOG_TIMESTAMP - $common_name connected with IP $trusted_ip" >> "$LOG_FILE"
                           ^----------^ SC2154 (warning): common_name is referenced but not assigned.
                                                          ^---------^ SC2154 (warning): trusted_ip is referenced but not assigned.

For more information:
  https://www.shellcheck.net/wiki/SC2154 -- common_name is referenced but not...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.