Skip to content

Commit

Permalink
Added: iMSCP::Service::getProvider() method which allow to get specif…
Browse files Browse the repository at this point in the history
…ic service provider instance

Added: support for enabling, disabling and removing services (sysvinit, upstart job, systemd system service units)
Removed: INIT_SCRIPTS_DIR, SERVICE_INSTALLER, SERVICE_MNGR, IMSCP_DAEMON_SNAME, IMSCP_NETWORK_SNAME and IMSCP_PANEL_SNAME main configuration parameters
Renamed init.d config dir to sysvinit for better understanding
Renamed init config dir to upstart for better understanding
CS fixes + refactoring + cleanup + doc
  • Loading branch information
nuxwin committed Mar 30, 2015
1 parent f93e95b commit e847a26
Show file tree
Hide file tree
Showing 60 changed files with 2,928 additions and 1,484 deletions.
11 changes: 7 additions & 4 deletions CHANGELOG
Expand Up @@ -5,16 +5,19 @@ Git 1.2.x
------------------------------------------------------------------------------------------------------------------------

BACKEND
Added: SysVinit, Upstart and Systemd service providers
Added: Custom DNS module ( Modules::CustomDNS )
Added: Service providers ( Sysvinit, Upstart and Systemd )
Changed: Perl version >= 5.14.2 is now required
Fixed: Any task which belongs to the custom DNS records layer must not involve HTTPD configuration change
Fixed: Bind9 must not be restarted each time a DNS zone is updated. A simple reload is sufficient
Fixed: Some errors are not trapped

CONFIGS
Added: imscp_daemon, imscp_network and imscp_panel upstart jobs
Added: php-apc ( enabled for i-MSCP frontEnd only - Debian < Jessie / Ubuntu < Trusty Thar )
Added: php-apc package ( enabled for i-MSCP frontEnd only - Debian < Jessie / Ubuntu < Trusty Thar )
Fixed: Wrong TMPDIR path ( php5-fpm )
Removed: INIT_SCRIPTS_DIR, SERVICE_INSTALLER, SERVICE_MNGR, IMSCP_DAEMON_SNAME, IMSCP_NETWORK_SNAME and
IMSCP_PANEL_SNAME main configuration parameters

DAEMON
Added: End child syslog message
Expand Down Expand Up @@ -55,7 +58,7 @@ PLUGINS
Updated: API to version 1.0.0

SKELETON
Removed: Link to the panel in default index.html file ( Panel must not be publicly exposed )
Removed: Link to the panel in default index.html files ( Panel must not be publicly exposed )
Fixed: Wrong link for favicon in error pages

SERVICES
Expand Down Expand Up @@ -209,7 +212,7 @@ BACKEND
Added: pigz ( Parallel Implementation of GZip ) algorithm for backups compression
Added: Standard directory which allow to load apache conffiles prior any other vhost file ( Apache )
Added: --verbose command line options for all scripts
Changed: i-MSCP is now run through a dedicated httpd instance by using the nginx Web server
Changed: i-MSCP frontEnd is now run through a dedicated httpd instance by using the nginx Web server
Changed: Logfiles are now written as soon as possible ( allows to mitigate memory consumption )
Changed: The quota accounting script is now run every 30 minutes
Fixed: Backend logs which are older than 7 days are never removed
Expand Down
10 changes: 5 additions & 5 deletions autoinstaller/Functions.pm
Expand Up @@ -396,7 +396,7 @@ sub _showUpdateNotices
for my $noticeFile(@noticeFiles) {
(my $noticeVersion = $noticeFile) =~ s/\.txt$//;

if(version->parse("v$imscpVersion") < version->parse("v$noticeVersion")) {
if(version->parse($imscpVersion) < version->parse($noticeVersion)) {
my $noticeBody = iMSCP::File->new( filename => "$noticesDir/$noticeFile" )->get();
unless(defined $noticeBody) {
error("Unable to read $noticesDir/$noticeFile file");
Expand Down Expand Up @@ -967,11 +967,11 @@ EOF

sub _installFiles
{
my $serviceMngr = iMSCP::Service->getInstance();

# i-MSCP daemon must be stopped before changing any file on the files system
if(-x "$main::imscpConfig{'INIT_SCRIPTS_DIR'}/$main::imscpConfig{'IMSCP_DAEMON_SNAME'}") {
my $rs = iMSCP::Service->getInstance()->stop($main::imscpConfig{'IMSCP_DAEMON_SNAME'});
error("Unable to stop $main::imscpConfig{'IMSCP_DAEMON_SNAME'} service") if $rs;
return $rs if $rs ;
if($serviceMngr->isRunning('imscp_daemon')) {
$serviceMngr->stop('imscp_daemon');
}

# Process cleanup to avoid any security risks and conflicts
Expand Down
9 changes: 0 additions & 9 deletions configs/debian/imscp.conf
Expand Up @@ -131,15 +131,6 @@ BACKUP_DOMAINS =
# Note: Both pigz and pbzip2 are recommended on SMP servers in place of gzip and bzip2
ZIP = pbzip2

## Service manager

INIT_SCRIPTS_DIR = /etc/init.d
SERVICE_INSTALLER = /usr/sbin/update-rc.d
SERVICE_MNGR = /usr/sbin/service
IMSCP_DAEMON_SNAME = imscp_daemon
IMSCP_NETWORK_SNAME = imscp_network
IMSCP_PANEL_SNAME = imscp_panel

## Virtual traffic manager

TRAFF_LOG_DIR = /var/log
Expand Down
117 changes: 0 additions & 117 deletions configs/debian/init.d/imscp_daemon

This file was deleted.

100 changes: 0 additions & 100 deletions configs/debian/init.d/imscp_network

This file was deleted.

19 changes: 0 additions & 19 deletions configs/debian/init/imscp_network.conf

This file was deleted.

0 comments on commit e847a26

Please sign in to comment.