Fortinet Document Library

Version:


Table of Contents

CLI Reference

6.0.0
Download PDF
Copy Link

auto-script

Commands to run and save the output of scripts created using the config system auto-script command. You can start and stop scripts, transfer their results to an FTP or TFTP server, delete save script output, display saved script output and so on.

execute auto-script backup ftp  Backup output file to FTP sever.
        {name}   Script name.
            {ftp server}[:ftp port]   FTP server IP or FQDN, can be attached with port.
                {Enter}|{user}   FTP username may be needed.
                    {passwd}   FTP password.

execute auto-script backup tftp  Backup output file to TFTP sever.
        {name}   Script name.
            {ip}   IP address of TFTP server.

execute auto-script delete  Delete output of executed scripts.
        {name}   Script name.

execute auto-script result  Display output of executed scripts.
        {name}   Script name.

execute auto-script start  Start script.
        {name}   Script name.

execute auto-script status  List of scripts currently running or executed.

execute auto-script stop  Stop script.
        {name}   Script name.

execute auto-script stopall  Stop all scripts currently running.

Example

This example shows how to backup the output file created by a script to an FTP server. The name of the script is scriptname. The FTP server to send the output file to has an IP address of 192.168.1.23. The account on the server has the user name ftpuser and the password ftpswd.

execute auto-script backup ftp scriptname 192.168.1.23 ftpuser ftpswd

auto-script

Commands to run and save the output of scripts created using the config system auto-script command. You can start and stop scripts, transfer their results to an FTP or TFTP server, delete save script output, display saved script output and so on.

execute auto-script backup ftp  Backup output file to FTP sever.
        {name}   Script name.
            {ftp server}[:ftp port]   FTP server IP or FQDN, can be attached with port.
                {Enter}|{user}   FTP username may be needed.
                    {passwd}   FTP password.

execute auto-script backup tftp  Backup output file to TFTP sever.
        {name}   Script name.
            {ip}   IP address of TFTP server.

execute auto-script delete  Delete output of executed scripts.
        {name}   Script name.

execute auto-script result  Display output of executed scripts.
        {name}   Script name.

execute auto-script start  Start script.
        {name}   Script name.

execute auto-script status  List of scripts currently running or executed.

execute auto-script stop  Stop script.
        {name}   Script name.

execute auto-script stopall  Stop all scripts currently running.

Example

This example shows how to backup the output file created by a script to an FTP server. The name of the script is scriptname. The FTP server to send the output file to has an IP address of 192.168.1.23. The account on the server has the user name ftpuser and the password ftpswd.

execute auto-script backup ftp scriptname 192.168.1.23 ftpuser ftpswd