Hi all,
I do not know much about pfsense command line.
Wondering if someone can help me step by step ?
Do I need command line access to the router or I can use the web access to the router ?
Can I use the command prompt section ?
So I have to create 2 executable files name notify.sh and disconnect.sh ? How I am going to create these files ?
I think I got the part to set the permissions. How can I set the permissions ? by using Execute Shell Command section on the web ?
What will be in those two files ?
So same code in both files ?
@Armstrong said in Email Notification - OpenVPN Client Connect (Common Name):
#!/usr/local/bin/php -q
<?php
require_once("/etc/inc/notices.inc");
$local_connect_value = " user_name: " . getenv('common_name') . " vpn_client_ip: " . getenv('ifconfig_pool_remote_ip') . " from: " . getenv('trusted_ip') . " on " . date('F j, Y, g:i a');
if ( strrchr (FILE , 'disconnect') ) {
$local_connect_value .= ", duration : " . getenv('time_duration') . " seconds, received : " . getenv('bytes_received') . " bytes, send : " . getenv('bytes_sent') ." bytes. DISCONNECTED.";
}
notify_all_remote($local_connect_value);
?>
Am I coping from <?php or from #!/user ?
If it is from <?php then what I have to do with first line #!/usr/local/bin/php -q
Is it possible some one can help me step by step and also tell me which part of the webconfigurator I need to use to do all this please ?