Diseño 141 – perfil VideoChat Chaturbate ya creado
Diseño simple y bien estructurado sobre un fondo blanco. Si te gustan los gatitos, esta puede ser tu eleccion de perfil para tu biografia. Ver Demo Las instrucciones con imagenes…
%PDF- %PDF-
| Direktori : /scripts/ |
| Current File : //scripts/modify_packages |
#!/usr/local/cpanel/3rdparty/bin/perl
# Copyright 2024 WebPros International, LLC
# All rights reserved.
# copyright@cpanel.net http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited.
use strict;
use warnings;
use Cpanel::Config::Constants ();
use Cpanel::Logger ();
use Cpanel::SafeFile ();
use Cpanel::Themes::Utils ();
use Whostmgr::ACLS ();
use Whostmgr::Packages::Fetch ();
use Whostmgr::Packages::Load ();
use Getopt::Long ();
my $logger = Cpanel::Logger->new();
$| = 1;
if ( $> != 0 ) {
$logger->die("Sorry, only root can use this script.");
}
my ( $theme, $packages, $help, $all_packages );
Getopt::Long::GetOptions(
'help' => \$help,
'theme=s' => \$theme,
'all-packages' => \$all_packages,
'packages=s' => \$packages
)
|| do {
usage();
exit 1;
};
if ($help) {
usage();
exit;
}
unless ( $theme && ( $all_packages || $packages ) ) {
usage();
exit 1;
}
my $theme_docroot = Cpanel::Themes::Utils::get_theme_root($theme);
$logger->die( "The specified theme [" . $theme . "] does not exist." ) unless -d $theme_docroot;
if ( !$ENV{'REMOTE_USER'} ) { $ENV{'REMOTE_USER'} = 'root'; }
Whostmgr::ACLS::init_acls();
my @list_pkgs = ();
my %pkgs = %{ Whostmgr::Packages::Fetch::fetch_package_list( 'want' => 'editable' ) };
my %valid_pkgs = ();
if ($all_packages) {
@list_pkgs = keys %pkgs;
%valid_pkgs = map { ( $_ => $pkgs{$_} ) } @list_pkgs;
}
else {
@list_pkgs = split( /\s*\,\s*/, $packages );
%valid_pkgs = map { exists( $pkgs{"$_"} ) ? ( $_ => $pkgs{$_} ) : () } @list_pkgs;
}
unless ( scalar( keys %valid_pkgs ) ) {
$logger->die("No valid packages are specified.");
}
my %updated_pkgs = ();
my $package_dir = Whostmgr::Packages::Load::package_dir();
foreach my $name ( keys %valid_pkgs ) {
# Should not happen but just in case
next unless -e $package_dir . $name;
my $pkglock = Cpanel::SafeFile::safeopen( \*PKG, '+<', $package_dir . $name );
if ( !$pkglock ) {
$logger->warn("Could not edit ${package_dir}$name");
next;
}
$updated_pkgs{$name} = 1;
my %PKG_CONFIG = %{ $valid_pkgs{$name} };
seek( PKG, 0, 0 );
foreach my $pkgitem ( sort keys %PKG_CONFIG ) {
next if !$pkgitem;
next if ( $pkgitem eq '_PACKAGE_EXTENSIONS' );
my $line = qq{$pkgitem=$PKG_CONFIG{$pkgitem}};
$line =~ s/[\r\n]//g;
if ( $pkgitem eq 'CPMOD' ) {
$line = qq{$pkgitem=$theme};
}
print PKG $line . "\n";
}
print PKG qq{_PACKAGE_EXTENSIONS=$PKG_CONFIG{_PACKAGE_EXTENSIONS}\n} if $PKG_CONFIG{_PACKAGE_EXTENSIONS}; # _PACKAGE_EXTENSIONS last in file.
truncate( PKG, tell(PKG) );
Cpanel::SafeFile::safeclose( \*PKG, $pkglock );
}
# The default package may or may not have a file.
my @failed_pkgs = grep { !$updated_pkgs{$_} && $_ ne 'default' } @list_pkgs;
if ( scalar @failed_pkgs ) {
$logger->warn( "Could not update these package(s): " . join( ', ', @failed_pkgs ) );
exit 1;
}
else {
$logger->info("Packages are successfully updated.");
exit 0;
}
sub usage {
print <<"EOM";
$0: Modify existing packages to use a theme
Usage:
$0 --theme=$Cpanel::Config::Constants::DEFAULT_CPANEL_THEME [--packages=my_pkg,another_pkg|--all-packages]
Options:
--help: print usage and exit
--theme: the theme to be adopted
--packages: a list of packages to be modified, comma separated
--all-packages: update all packages on the system
EOM
return;
}
Diseño simple y bien estructurado sobre un fondo blanco. Si te gustan los gatitos, esta puede ser tu eleccion de perfil para tu biografia. Ver Demo Las instrucciones con imagenes…
Un diseño pensado para usarlo en las fiestas de navidad. Lo podemos personalizar, poniendo tu foto de fondo y asi darle un toque totalmente personal. Ver Demo Las instrucciones con…
Feliz año nuevo - empieza el nuevo año deseando y deseandote todo lo mejor. Puedes usar este diseño en los primeros dias del año, para recrear la atmosfera fertiva que…
Si eres amante de las motos y la montaña, puedes usar este diseño en tu perfil. Concebido en especial para chicos. Lo podemos personalizar para ti, si nos envias un…
Un diseño maravilloso para tu pagina en chaturbate. El diseño esta enfocado en el periodo invernal y lo puedes usar tranquilamente al menos en los meses de diciembre y enero.…
No siempre la navidad debe ser brillante, sobre todo si no se adapta a tu forma de ser. Si consideras que tienes un lado gotico, algo oscuro y quieres quieres…
A casi todos nos gustan los gatos, pero este gato es especial, ya que hace yoga para calmar sus instintos felinos. Es probable que si eres una persona flexible, calma…
Las fiestas de navidad, son una buena oportunidad para lucirte en tu show online. Hazlo con un perfil divertido, muy bien estructurado y un diseño claro. Ver Demo Las instrucciones…
Bonito, elegante, lujo, son solo algunas de las palabras que podrian definir este diseño. Recomendado para las personas que desean dar un aspecto mas elegante a su sala de chat.…
Esqueletos, calabazas y arañas, abrazadas por el fuego desatado en la unica noche del año cuando el velo entre los vivos y los muertos, es tan fino que casi se…