#!/bin/sh
source "./custom/defines.sh"

# Create dynamic config directory if it doesn't exist
mkdir -p "${DYNAMIC_CONFIG_DIR}"

# Create default config file
echo "syslocation Default location" > "${DYNAMIC_CONFIG_FILE}"

setman-log notice snmpd "Disabling SNMP service..."
systemctl disable --now snmpd.service

# Re-create empty user credential file
rm -f "${SNMPD_USER_CRED_FILE}"
mkdir -p "${SNMPD_USER_CRED_FILE_DIR}"
touch "${SNMPD_USER_CRED_FILE}"
