enable() -> ok | {error, Res}
enable(Dir, Conf) -> ok | {error, Error}
Types
Enables the os_sup
service. Needed on Solaris only.
If the configuration parameter os_sup_enable
is false
, this function is called automatically by os_sup
, using the values of os_sup_own
and os_sup_syslogconf
as arguments.
If os_sup_enable
is true
, this function must be called before OS_Mon/os_sup
is started. Dir
defines the directory which contains the backup copy and the Erlang specific configuration files for syslogd
, and a named pipe to receive the messages from syslogd
. Defaults to "/etc"
. Conf
defines the full name of the configuration file for syslogd
. Default is "/etc/syslog.conf"
.
Results in a OS call to:
<PRIVDIR>/bin/mod_syslog otp Dir Conf
where <PRIVDIR>
is the priv
directory of OS_Mon, code:priv_dir(os_mon)
.
Returns ok
if this yields the expected result "0"
, and {error, Res}
if it yields anything else.
This function requires root privileges to succeed.