jml
jml

Reputation: 66

Apache listed in runlevels, not starting at boot (OpenSuse 12.3)

I want my compiled apache2 server to run when my OpenSuse 12.3 server boots.

I've followed the procedure listed in https://serverfault.com/questions/16839/how-do-i-get-apache-to-startup-at-bootime-on-linux, namely:

I can see it listed in YaST's runlevel manager (not sure about the exact name as my distro is in spanish) as

apache2 Yes*

I take it that this means that the service is configured to start at boot but isn't running when I check.

The content of my /etc/init.d/apache2 is:

#!/bin/bash
#
### BEGIN INIT INFO
# Provides:       apache2
# Default-Start:  3 5
# Description:    Controlar el servidor apache2
### END INIT INFO
/home/servidor/apache/bin/apachectl $@

I've tried changing the file's permissions, enabling the service through systemd and pretty much everything I've found online to no avail:

systemctl start apache2.service
systemctl enable apache2.service
chkconfig apache2 on

Any help would be greatly appreciated.

Upvotes: 2

Views: 1507

Answers (1)

jatyap
jatyap

Reputation: 31

Have you tried adding the chkconfig support lines in your init.d file?

# chkconfig: - 85 15
# description: Apache is a World Wide Web server.  It is used to serve \
#              HTML files and CGI.
# processname: httpd
# config: /etc/httpd/conf/httpd.conf
# config: /etc/sysconfig/httpd
# pidfile: /var/run/httpd.pid

Of course, change the paths and values accordingly. For more details you could check https://code.google.com/p/xinc/issues/detail?id=145. It's not an openSuse forum but chkconfig works on openSuse 12.3 as well.

Upvotes: 2

Related Questions