Fix AdminBin: add shebang and __PACKAGE__->run()
cPanel's adminbin framework requires the module to be directly executable with a shebang line, and Script::Call modules need __PACKAGE__->run() to bootstrap. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
#!/usr/local/cpanel/3rdparty/bin/perl
|
||||||
package Cpanel::AdminBin::Script::Call::Gniza::Restore;
|
package Cpanel::AdminBin::Script::Call::Gniza::Restore;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
@@ -6,6 +7,8 @@ use parent 'Cpanel::AdminBin::Script::Call';
|
|||||||
use IPC::Open3;
|
use IPC::Open3;
|
||||||
use Symbol 'gensym';
|
use Symbol 'gensym';
|
||||||
|
|
||||||
|
__PACKAGE__->run() if !caller;
|
||||||
|
|
||||||
my $GNIZA_BIN = '/usr/local/bin/gniza';
|
my $GNIZA_BIN = '/usr/local/bin/gniza';
|
||||||
my $MAIN_CONFIG = '/etc/gniza/gniza.conf';
|
my $MAIN_CONFIG = '/etc/gniza/gniza.conf';
|
||||||
my $REMOTES_DIR = '/etc/gniza/remotes.d';
|
my $REMOTES_DIR = '/etc/gniza/remotes.d';
|
||||||
|
|||||||
Reference in New Issue
Block a user