# SMArT / nwwebui configuration file

# ------------------------------------------------------------
# UI colors
# ------------------------------------------------------------

# Background color used for the main page body.
$COLOR_BACK = "#F0F0FF";

# Background color used for section headers.
$COLOR_HEAD_BACK = "#C0C0FF";

# Text color used for section headers.
$COLOR_HEAD_FORE = "#000000";

# Background color used for subsection headers.
$COLOR_SUBH_BACK = "#D0D0FF";

# Text color used for subsection headers.
$COLOR_SUBH_FORE = "#000000";

# Background color used for normal content rows.
$COLOR_TEXT_BACK = "#E0E0FF";

# Text color used for normal content rows.
$COLOR_TEXT_FORE = "#000000";

# ------------------------------------------------------------
# Main MARS NWE configuration
# ------------------------------------------------------------

# Path to the main mars_nwe server configuration file.
# This file is read and modified by the SMArT configuration pages.
$mars_config = '@MARS_NWE_INSTALL_FULL_CONFDIR@/nwserv.conf';

# User name used when SMArT drops privileges for non-root operations.
# Keep this set to an unprivileged local account.
$nonroot_user = 'nobody';

# Write the mars_nwe configuration file in compact form.
# 0 = preserve comments, blank lines and the original section layout
# 1 = write a compact configuration file without the original long comments
$smart_compact_nwservconf = 0;

# ------------------------------------------------------------
# SMArT internal file layout
# ------------------------------------------------------------

# Absolute path to the SMArT configuration file itself.
# Used when SMArT needs to append updated settings.
$smart_conf_path = '@MARS_NWE_INSTALL_FULL_CONFDIR@/smart.conf';

# File used to store bindery login information for SMArT helper tools.
# This file should remain readable only by the service user or root.
$smart_nwclient_path = '@MARS_NWE_INSTALL_FULL_CONFDIR@/.nwclient';

# Directory containing static HTML and image files served by SMArT.
$smart_static_dir = '@MARS_NWE_INSTALL_FULL_LIBEXECDIR@/static';

# Log file used by the Perl SMArT frontend.
# Keep this separate from the nwwebui log file.
$smart_log_path = '@MARS_NWE_LOG_DIR@/smart.log';

# Path to the PAM-based login helper used for root authentication.
$smart_check_login = '@MARS_NWE_INSTALL_FULL_LIBEXECDIR@/check_login';


# Path to the SMArT service-control helper.
$smart_control_path = '@MARS_NWE_INSTALL_FULL_LIBEXECDIR@/control';

# systemd unit controlled by the SMArT service-control page.
$mars_nwe_service = '@MARS_NWE_SYSTEMD_SERVICE@';

# systemctl executable used by the service-control helper.
$smart_systemctl_path = '@SYSTEMCTL_EXECUTABLE@';

# Optional explicit path to the main SMArT Perl program.
# This is normally not required, because nwwebui already has a built-in default.
# Uncomment and adjust only if a non-standard location must be used.
# $smart_perl_path = '@MARS_NWE_INSTALL_FULL_LIBEXECDIR@/smart';

# ------------------------------------------------------------
# Host printer / CUPS utility integration
# ------------------------------------------------------------

# Enable CUPS host-printer discovery in the SMArT queue UI.
# This value is generated from cmake/modules/cupsutils.cmake.
# 1 = enabled, 0 = disabled
$smart_cups_enable = '@SMART_CUPS_ENABLE@';

# lpstat executable used to discover local CUPS printers for the queue UI.
$smart_cups_lpstat_path = '@CUPS_LPSTAT_EXECUTABLE@';

# Command template used when SMArT creates a print queue from a CUPS printer.
# %p is replaced with the sanitized CUPS printer name.
# The trailing '-' makes lp read the print job from stdin.
$smart_cups_print_command_template = '@CUPS_LP_EXECUTABLE@ -d %p -';

# ------------------------------------------------------------
# nwwebui listener settings
# ------------------------------------------------------------

# IP address used for the HTTP and HTTPS listeners.
# Use 0.0.0.0 to listen on all IPv4 interfaces.
# Use 127.0.0.1 for local-only testing.
$nw_bind_ip = '0.0.0.0';

# Log level used by nwwebui.
# 0 = errors only
# 1 = informational messages
# 2 = debug messages
$nw_log_level = 1;

# Run nwwebui in daemon mode by default.
# 0 = stay in foreground
# 1 = detach into background
$nw_daemonize = 0;

# PID file written by nwwebui.
$nw_pid_file = '@MARS_NWE_PID_DIR@/nwwebui.pid';

# Log file written by nwwebui.
$nw_log_file = '@MARS_NWE_LOG_DIR@/nwwebui.log';

# Enable or disable TLS/SSL support.
# 1 = enable HTTPS listener
# 0 = disable HTTPS listener
#
# When disabled, nwwebui can still serve plain HTTP if nw_http_port > 0.
$nw_ssl_enable = 0;

# Plain HTTP listener port.
# Set to 0 to disable plain HTTP completely.
# This is useful for local or isolated-network testing.
$nw_http_port = 9080;

# HTTPS listener port.
# Used only when $nw_ssl_enable is set to 1.
# Set to 0 to disable HTTPS listening.
$nw_https_port = 9443;

# TLS certificate file in PEM format.
# Required only when HTTPS is enabled.
$nw_cert_file = '@MARS_NWE_INSTALL_FULL_CONFDIR@/server.crt';

# TLS private key file in PEM format.
# Required only when HTTPS is enabled.
$nw_key_file = '@MARS_NWE_INSTALL_FULL_CONFDIR@/server.key';

# Directory for HTML login cookie sessions. Created by systemd RuntimeDirectory.
$smart_session_dir = '/run/mars-nwe-webui';
$smart_session_timeout = 3600;
