service not in Debian5, only newer Ubuntu, which complains about /etc/init.d/xx

This commit is contained in:
Ralf Becker 2010-06-14 08:14:19 +00:00
parent 45dca7586f
commit 59beb0a6ca

View File

@ -102,9 +102,18 @@ function set_distro_defaults($distro=null)
$config['ldap_group_context'] = 'ou=group,$base'; $config['ldap_group_context'] = 'ou=group,$base';
break; break;
case 'debian': case 'debian':
// service not in Debian5, only newer Ubuntu, which complains about /etc/init.d/xx
if (file_exists('/usr/sbin/service'))
{
$config['start_db'] = '/usr/sbin/service mysql'; $config['start_db'] = '/usr/sbin/service mysql';
$config['autostart_db'] = '/usr/sbin/update-rc.d mysql defaults';
$config['start_webserver'] = '/usr/sbin/service apache2'; $config['start_webserver'] = '/usr/sbin/service apache2';
}
else
{
$config['start_db'] = '/etc/init.d/mysql';
$config['start_webserver'] = '/etc/init.d/apache2';
}
$config['autostart_db'] = '/usr/sbin/update-rc.d mysql defaults';
$config['autostart_webserver'] = '/usr/sbin/update-rc.d apache2 defaults'; $config['autostart_webserver'] = '/usr/sbin/update-rc.d apache2 defaults';
break; break;
case 'mandriva': case 'mandriva':