File: //usr/local/cwaf/scripts/cwatch/update-token.pl
#!/bin/sh
eval 'if [ -x /usr/local/cpanel/3rdparty/bin/perl ]; then exec /usr/local/cpanel/3rdparty/bin/perl -x -- $0 ${1+"$@"}; else exec /usr/bin/perl -x $0 ${1+"$@"}; fi;'
if 0;
#!/usr/bin/perl
use strict qw(refs subs);
use warnings;
BEGIN { require '/etc/cwaf/use_lib.pl' if -f '/etc/cwaf/use_lib.pl'; }
use Comodo::CWAF::cWatch;
my $num_args = $#ARGV + 1;
if ($num_args == 0) {
&do_print_help_message();
exit(0);
}
my $data = {'token'=>$ARGV[0]};
if( save_mssp_info($data) ) {
print "Your Network Token has been updated.\n";
} else {
print "Can't update your Network Token. Sorry.\n";
}
# &help_message()
# print help message
#
# RETURN: none
sub do_print_help_message {
print <<END;
Script to update your cWATCH network token.
Usage: $0 <NetworkToken>
END
}