summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-11-22 00:09:25 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-11-22 00:09:25 +0000
commita07fbc84deb88cc156767c1b4043d6b4ac0946ae (patch)
tree3df5b14792d4769b356eb8658647d8a5e6d051c7
parent34af0cab0afe482ee70bc419ab7c3f8b844d2698 (diff)
downloadpfsense-a07fbc84deb88cc156767c1b4043d6b4ac0946ae.zip
pfsense-a07fbc84deb88cc156767c1b4043d6b4ac0946ae.tar.gz
Teach pfSense's php shell how to record and playback a set of commands.
For instance you could automate a series of reptitive developer commands. For example: pfSense shell: record restartftp pfSense shell: = killall ftp-proxy pfSense shell: system_start_ftp_helpers(); pfSense shell: = ps awux | grep ftp-proxy pfSense shell: stoprecording And then you could replay the above commands later with: pfSense shell: playback restartftp
-rwxr-xr-xusr/local/sbin/pfSsh.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/local/sbin/pfSsh.php b/usr/local/sbin/pfSsh.php
index 82d0c33..6130c61 100755
--- a/usr/local/sbin/pfSsh.php
+++ b/usr/local/sbin/pfSsh.php
@@ -232,6 +232,7 @@ while($shell_active == true) {
$command = "";
conf_mount_ro();
echo "\nRecording stopped.\n";
+ $recording = false;
} else {
echo "\nNo recording session in progress.\n";
$command = "";
@@ -264,7 +265,7 @@ while($shell_active == true) {
fwrite($recording_fd, $command . "\n");
}
}
- unset($playback_file_contents);
- unset($playback);
+ unset($playback_file_contents);
+ unset($playback);
}
OpenPOWER on IntegriCloud