### Install OpenMediaVault Package Source: https://docs.openmediavault.org/en/8.x/installation/on_debian.html Install the openmediavault package using apt-get. This command sets environment variables for a non-interactive installation and updates the package list before installing. ```bash export LANG=C.UTF-8 export DEBIAN_FRONTEND=noninteractive export APT_LISTCHANGES_FRONTEND=none apt-get update apt-get --yes --auto-remove --show-upgraded --allow-downgrades --allow-change-held-packages --no-install-recommends --option DPkg::Options::="--force-confdef" --option DPkg::Options::="--force-confold" install openmediavault ``` -------------------------------- ### Install OpenMediaVault Keyring Source: https://docs.openmediavault.org/en/8.x/installation/on_debian.html Manually download and install the OpenMediaVault archive keyring for package verification. ```bash apt-get install --yes gnupg wget --quiet --output-document=- https://packages.openmediavault.org/public/archive.key | gpg --dearmor --yes --output "/usr/share/keyrings/openmediavault-archive-keyring.gpg" ``` -------------------------------- ### Example: Customize Postfix main.cf Source: https://docs.openmediavault.org/en/8.x/various/advset.html An example demonstrating how to append custom network settings to the Postfix main configuration file using a SaltStack file.append state. ```yaml customize_postfix_main: file.append: - name: "/etc/postfix/main.cf" - text: | mynetworks = 127.0.0.0/8 168.100.189.0/28 ``` -------------------------------- ### Example: Disable Zeroconf for ProFTPD Source: https://docs.openmediavault.org/en/8.x/administration/general/network.html A complete example showing how to disable Zeroconf for the ProFTPD service and apply the changes. ```bash # omv-env set -- OMV_PROFTPD_ZEROCONF_ENABLED no # omv-salt stage run prepare # omv-salt deploy run avahi ``` -------------------------------- ### Example Route Manifest Configuration Source: https://docs.openmediavault.org/en/8.x/development/plugins.html An example of a route manifest file, demonstrating how to specify a URL, title, notification title, and component for a new on-access scan page. ```yaml version: "1.0" type: route data: url: "/services/clamav/onaccess-scans/create" title: _("Create") notificationTitle: _("Created on-access scan.") component: omv-services-clamav-onaccess-scan-form-page ``` -------------------------------- ### Configure systemd-resolved Source: https://docs.openmediavault.org/en/8.x/installation/on_debian.html Install and configure systemd-resolved to ensure DNS functionality during the OpenMediaVault installation process. ```bash apt-get install --yes systemd-resolved psmisc systemctl enable --now systemd-resolved.service systemctl restart systemd-resolved.service resolvectl dns ``` -------------------------------- ### Troubleshoot GRUB Installation Error Source: https://docs.openmediavault.org/en/8.x/installation/via_iso.html Commands to execute within a chroot environment to fix GRUB installation issues during OpenMediaVault setup. Replace '/dev/sd[a-z]' with the target drive. ```bash # Chroot. chroot /target # Replace [a-z] with the drive you want to install grub to. # This is normally the drive you've selected to install OpenMediaVault on. grub-install /dev/sd[a-z] # Update GRUB. update-grub # Exit chroot. exit # Exit shell. exit ``` -------------------------------- ### Samba Share Configuration Example Source: https://docs.openmediavault.org/en/8.x/administration/services/samba.html An example of a default share configuration for 'MyDocuments'. This defines access controls, browsing, and file permissions for the share. ```ini [MyDocuments] path = /media//dev/disk/by-label/VOLUME1/Documents/ guest ok = no read only = no browseable = yes inherit acls = yes inherit permissions = no ea support = no store dos attributes = no printable = no create mask = 0755 force create mode = 0644 directory mask = 0755 force directory mode = 0755 hide dot files = yes valid users = "john" invalid users = read list = write list = "john" ``` -------------------------------- ### Configure Database Nodes Source: https://docs.openmediavault.org/en/8.x/development/tools/helper_functions.html Example usage of configuration helper functions within a plugin post-installation script to add nodes and keys to the OMV database. ```bash omv_config_add_node "/config/services" "${SERVICE_XPATH_NAME}" omv_config_add_key "${SERVICE_XPATH}" "enable" "0" omv_config_add_key "${SERVICE_XPATH}" "name" "MiniDLNA Server on OpenMediaVault" omv_config_add_key "${SERVICE_XPATH}" "port" "8200" omv_config_add_key "${SERVICE_XPATH}" "strict" "0" omv_config_add_key "${SERVICE_XPATH}" "tivo" "0" omv_config_add_key "${SERVICE_XPATH}" "rootcontainer" "." omv_config_add_node "${SERVICE_XPATH}" "shares" omv_config_add_key "${SERVICE_XPATH}" "loglevel" "error" omv_config_add_key "${SERVICE_XPATH}" "extraoptions" "" ``` -------------------------------- ### Log File Manifest Example Source: https://docs.openmediavault.org/en/8.x/development/plugins.html A manifest file example for configuring a log file in the system logs datatable, including ID, text, columns, and request details. ```yaml version: "1.0" type: log data: id: clamav text: _("Antivirus") columns: - name: _("Date & Time") sortable: true prop: ts cellTemplateName: localeDateTime flexGrow: 1 - name: _("Message") sortable: true prop: message flexGrow: 2 request: service: LogFile method: getList params: id: clamav ``` -------------------------------- ### POST /rpc.php (Get Settings) Source: https://docs.openmediavault.org/en/8.x/development/howitworks.html Retrieves configuration settings for a specific service from the backend. ```APIDOC ## POST /rpc.php ### Description Retrieves the current configuration settings for a specified service. ### Method POST ### Endpoint /rpc.php ### Request Body - **service** (string) - Required - The name of the service (e.g., "SMB") - **method** (string) - Required - The method to execute (e.g., "getSettings") - **params** (object) - Optional - Parameters for the method - **options** (object) - Optional - Additional options ### Request Example { "service":"SMB", "method":"getSettings", "params":null, "options":null } ### Response #### Success Response (200) - **response** (object) - The configuration settings object - **error** (null|string) - Error message if applicable #### Response Example { "response":{ "enable":true, "workgroup":"HOME", "serverstring":"%h server", "loglevel":0 }, "error":null } ``` -------------------------------- ### Form Page Component Example Source: https://docs.openmediavault.org/en/8.x/development/plugins.html An example of a component manifest for a form page, detailing service requests, fields, and button actions. ```yaml version: "1.0" type: component data: name: omv-services-clamav-onaccess-scan-form-page type: formPage config: request: service: ClamAV get: method: getOnAccessPath params: uuid: "{{ _routeParams.uuid }}" post: method: setOnAccessPath fields: - type: confObjUuid - type: checkbox name: enable label: _("Enabled") value: false - type: sharedFolderSelect name: sharedfolderref label: _("Shared folder") hint: _("The location of the files to scan on-access.") validators: required: true buttons: - template: submit execute: type: url url: "/services/clamav/onaccess-scans" - template: cancel execute: type: url url: "/services/clamav/onaccess-scans" ``` -------------------------------- ### List all environment variables Source: https://docs.openmediavault.org/en/8.x/various/advset.html Use this command to get a list of all available environment variables that can be configured. ```bash # omv-env list ``` -------------------------------- ### User Import CSV Example Source: https://docs.openmediavault.org/en/8.x/administration/users.html Example CSV data format for importing multiple users. Fields include name, UID, tags, email, password, shell, groups, and account modification status. Ensure UID is numeric and within the 1000-60000 range. ```csv # ;;;;;;; user1;1001;user1;user1@myserver.com;password1;/bin/bash;sudo;1 user2;1002;user2;user2@my.com;password2;/bin/sh;;0 user3;1003;user3;user3@example.com;password3;/bin/false;;1 user4;1004;user4;user4@test.com;password4;;;1 ``` -------------------------------- ### Navigation Item Manifest Example Source: https://docs.openmediavault.org/en/8.x/development/plugins.html Shows how to define a navigation item for the left-side menu, including path, text, position, icon, and URL. ```yaml version: "1.0" type: navigation-item data: path: "services.clamav.onaccess-scans" text: _("On Access Scans") position: 20 icon: "mdi:file-eye" url: "/services/clamav/onaccess-scans" ``` -------------------------------- ### RFC 4716 Public Key Example Source: https://docs.openmediavault.org/en/8.x/administration/services/ssh.html Example of a public key formatted in the RFC 4716 standard. ```text ---- BEGIN SSH2 PUBLIC KEY ---- Comment: "iPhone user1" AAAAB3NzaC1yc2EAAAADAQABAAABAQDfSQulxffUktx2P6EikkjVxDw0tT8nCW8LHLx/kl 8t37xFQ5/OoL9m6rVzYy5CFGYt+l7DffWjL0Av7AqaM0ykZVmv2VEM6TmMo56LTlmyZdlz X5+GEJgCQNtDxcIYAVuPXKpLtlB/uAGzwHdZWpAen+mHgWIi4va8N5QNn4rXpkREcvM1q4 snyAi+gyjAS2Dn4pm8zzrd9qQFnoRYzidbp5e2Rs3brOkwUco0ZkOME2Ff6SpLGaXz4DHH qgdTqZwHaTXEwm6kDmglCQrauIPI/ggNqz9mVEspYkskR2PM4CAty8RkZD4MQe5K3EMAFR aFobBSlhQ3ESCYWNXTS3bF ---- END SSH2 PUBLIC KEY ---- ``` -------------------------------- ### Manage Debian Packages via CLI Source: https://docs.openmediavault.org/en/8.x/various/apt.html Standard APT commands for installing, removing, and purging packages on the system. ```bash $ apt-get install ``` ```bash $ apt-get remove ``` ```bash $ apt-get purge ``` -------------------------------- ### Standard C-style Control Structures Source: https://docs.openmediavault.org/en/8.x/development/coding_guideline.html Examples of common control structures including for, switch, if-else, and foreach loops. ```c for (i = 0; i < 10; i++) { if (foo(i)) { bar(); } } ``` ```c switch (x) { case 'a': ... break; case "b": ... break; default: ... break; } ``` ```c if (a) { foo(); } else { bar(); } ``` ```c if (TRUE === $result) break; ``` ```c foreach ($output as $outputk => $outputv) { foo(); } ``` -------------------------------- ### Dashboard Widget Manifest Example Source: https://docs.openmediavault.org/en/8.x/development/plugins.html Illustrates a manifest file for a dashboard widget, specifying ID, permissions, title, type, and chart configuration. ```yaml version: "1.0" type: dashboard-widget data: id: 9984d6cc-741b-4fda-85bf-fc6471a61e97 permissions: role: - admin title: _("CPU Usage") type: chart chart: type: gauge min: 0 max: 100 displayValue: true request: service: System method: getInformation label: formatter: template formatterConfig: "{{ value | tofixed(1) }}%" dataConfig: - label: Usage prop: cpuUsage backgroundColor: "#4cd964" ``` -------------------------------- ### POST /rpc.php (Get Share List) Source: https://docs.openmediavault.org/en/8.x/development/howitworks.html Retrieves a paginated list of shares for a specific service. ```APIDOC ## POST /rpc.php ### Description Retrieves a list of shares associated with a service, supporting pagination and sorting. ### Method POST ### Endpoint /rpc.php ### Request Body - **service** (string) - Required - The name of the service (e.g., "SMB") - **method** (string) - Required - The method to execute ("getShareList") - **params** (object) - Required - Pagination and sorting parameters ### Request Example { "service":"SMB", "method":"getShareList", "params":{ "start":0, "limit":25, "sortfield":"sharedfoldername", "sortdir":"ASC" }, "options":null } ### Response #### Success Response (200) - **response** (object) - Contains total count and data array #### Response Example { "response":{ "total":1, "data":[ { "uuid":"9e4c8405-b01c-40b6-8c46-af6be17a1ff6", "sharedfoldername":"sf1" } ] }, "error":null } ``` -------------------------------- ### Get all configured environment variables Source: https://docs.openmediavault.org/en/8.x/various/advset.html Retrieve a list of all environment variables that are currently set in the system. ```bash # omv-env get ``` -------------------------------- ### Block Comment for Output Parsing Source: https://docs.openmediavault.org/en/8.x/development/coding_guideline.html This example demonstrates using block comments to explain the parsing of output lines, followed by a foreach loop. ```php // Parse output: // shadow:x:42:openmediavault // snmp:x:112: // sambashare:x:113: // openmediavault:x:999: // nut:x:114: foreach ($output as $outputv) { ... } ``` -------------------------------- ### Dirty Modules Configuration Source: https://docs.openmediavault.org/en/8.x/development/howitworks.html Example content of the dirtymodules.json file indicating which services require reconfiguration. ```json [ "samba", "zeroconf" ] ``` -------------------------------- ### Modify Filesystem Mount Entry Source: https://docs.openmediavault.org/en/8.x/various/fs_env_vars.html Example of a filesystem entry in the configuration file and the corresponding options line modification. ```xml f767ee54-eb3a-44c5-b159-1840a289c84b /dev/disk/by-label/VOLUME1 /srv/dev-disk-by-label-VOLUME1 ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2 0 ``` ```xml defaults,nofail,user_xattr,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl ``` -------------------------------- ### NFS Export Configuration Source: https://docs.openmediavault.org/en/8.x/administration/services/nfs.html Example entries for the /etc/exports file, including standard shares and the NFSv4 pseudo file system. ```text /export/Shared_1 (fsid=1,rw,subtree_check,secure,root_squash) /export/Videos 10.10.0.0/24 (fsid=2,rw,subtree_check,secure,nroot_squash) /export (ro,fsid=0,root_squash,no_subtree_check,hide) ``` -------------------------------- ### RSync Daemon Server Addresses Source: https://docs.openmediavault.org/en/8.x/administration/services/rsync.html Examples of how to specify remote RSync daemon server addresses for client jobs. ```shell rsync://10.10.10.12/ModuleName username@10.10.10.12::ModuleName rsync://username@10.10.10.12:873/ModuleName ``` -------------------------------- ### Get RAID Creation Candidates with omv-rpc and jq Source: https://docs.openmediavault.org/en/8.x/development/tools/omv_rpc.html This command retrieves potential block devices for RAID creation. The output is piped to `jq` for pretty-printing the JSON response. Requires 'admin' user privileges. ```bash # omv-rpc -u admin 'RaidMgmt' 'getCandidates' | jq ``` -------------------------------- ### Example Output of Shared Folder Path Retrieval Source: https://docs.openmediavault.org/en/8.x/administration/storage/sharedfolders.html This is the expected output when successfully retrieving the full path of a shared folder using the `omv_get_sharedfolder_path` helper function. ```shell $ /srv/dev-disk-by-label-VOLUME1/data_general/videos ``` -------------------------------- ### Assign FTP Access Privileges Source: https://docs.openmediavault.org/en/8.x/administration/services/ftp.html Define access permissions for directories within the FTP server. This example restricts access to 'OR omvUser' for all operations, denying others. ```apache AllowUser OR omvUser DenyAll AllowUser OR omvUser DenyAll ``` -------------------------------- ### OpenMediaVault Build Command Source: https://docs.openmediavault.org/en/8.x/development/plugins.html Command to build and apply the web interface configuration. Use 'all' for a full build or specific targets like 'route' or 'i18n'. ```bash omv-mkworkbench COMMAND ``` -------------------------------- ### Add OpenMediaVault Repository Source: https://docs.openmediavault.org/en/8.x/installation/on_debian.html Add the OpenMediaVault repository to your system's sources list. Ensure the GPG key is correctly set up. ```bash deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://downloads.sourceforge.net/project/openmediavault/packages synchrony partner ``` -------------------------------- ### Add OpenMediaVault Repositories Source: https://docs.openmediavault.org/en/8.x/installation/on_debian.html Append the OpenMediaVault package repository configuration to the system sources list. ```bash cat <> /etc/apt/sources.list.d/openmediavault.list deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://packages.openmediavault.org/public synchrony main # deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://downloads.sourceforge.net/project/openmediavault/packages synchrony main ## Uncomment the following line to add software from the proposed repository. # deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://packages.openmediavault.org/public synchrony-proposed main # deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://downloads.sourceforge.net/project/openmediavault/packages synchrony-proposed main ## This software is not part of OpenMediaVault, but is offered by third-party ## developers as a service to OpenMediaVault users. # deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://packages.openmediavault.org/public synchrony partner ``` -------------------------------- ### Populate OpenMediaVault Configuration Database Source: https://docs.openmediavault.org/en/8.x/installation/on_debian.html Populate the OpenMediaVault configuration database with existing system settings, such as network configuration from /etc/network/interfaces. ```bash omv-confdbadm populate ``` -------------------------------- ### Apply custom configuration changes Source: https://docs.openmediavault.org/en/8.x/various/advset.html After modifying environment variables, restart the openmediavault engine and run SaltStack stages to apply the changes. ```bash # monit restart omv-engined # omv-salt stage run prepare # omv-salt stage run deploy ``` -------------------------------- ### Run deployment stage Source: https://docs.openmediavault.org/en/8.x/development/tools/omv_salt.html Executes the deployment stage to apply all pending service configurations. ```bash # omv-salt stage run deploy ``` -------------------------------- ### PHP Constant Naming Convention Source: https://docs.openmediavault.org/en/8.x/development/coding_guideline.html Constants should start with OMV_ and be all uppercase. ```php $OMV_DEFAULT_FILE = "/etc/default/openmediavault"; ``` ```php $OMV_JSONSCHEMA_SORTFIELD = '"type":["string","null"]'; ``` -------------------------------- ### List available stages Source: https://docs.openmediavault.org/en/8.x/development/tools/omv_salt.html Displays predefined stages that bundle multiple configuration tasks. ```bash # omv-salt stage list ``` -------------------------------- ### Source Helper Functions Source: https://docs.openmediavault.org/en/8.x/development/tools/helper_functions.html Load the OpenMediaVault helper functions into the current shell session. ```bash $ source /usr/share/openmediavault/scripts/helper-functions ``` -------------------------------- ### Accessing the configuration database with nano Source: https://docs.openmediavault.org/en/8.x/development/tools/omv_confdbadm.html Manual editing of the configuration file is discouraged as it can lead to database corruption. ```bash $ nano /etc/openmediavault/config.xml ``` -------------------------------- ### Get a specific environment variable Source: https://docs.openmediavault.org/en/8.x/various/advset.html Fetch the value of a particular environment variable by specifying its name. ```bash # omv-env get ``` -------------------------------- ### Deploy Smartmontools Configuration Source: https://docs.openmediavault.org/en/8.x/administration/storage/disks.html This command deploys smartmontools configurations after manually editing the `/etc/openmediavault/config.xml` file to set advanced power management or other disk-related settings not available through the UI. Ensure you have made the necessary XML edits before running this command. ```bash $ omv-salt deploy run smartmontools ``` -------------------------------- ### Deploy fstab with omv-salt Source: https://docs.openmediavault.org/en/8.x/administration/storage/filesystems.html This command is used to write filesystem entries to `/etc/fstab` based on the configuration in `config.xml`. Entries managed by OpenMediaVault are identifiable by specific tags. ```bash omv-salt deploy run fstab ``` -------------------------------- ### SSH Remote Server Address Source: https://docs.openmediavault.org/en/8.x/administration/services/rsync.html Example of specifying a remote server address when using SSH for RSync transport. ```shell username@10.10.0.12:/srv/dev-disk-by-label-VOLUME1/Documents ``` -------------------------------- ### Edit OpenMediaVault Configuration Source: https://docs.openmediavault.org/en/8.x/various/fs_env_vars.html Command to open the internal configuration file for manual modification. ```bash # nano /etc/openmediavault/config.xml ``` -------------------------------- ### Configure Loadcpufreq Service Source: https://docs.openmediavault.org/en/8.x/administration/general/powermanagement.html Enables the loadcpufreq service via the default configuration file. ```bash ENABLE="true" ``` -------------------------------- ### List Supported Service Discovery Variables Source: https://docs.openmediavault.org/en/8.x/administration/general/network.html Command to retrieve a list of environment variables supported for controlling service advertisement via Zeroconf/mDNS. ```bash ``` -------------------------------- ### Deploy custom SaltStack service configuration Source: https://docs.openmediavault.org/en/8.x/various/advset.html After defining custom Salt states, use this command to deploy the configuration changes for a specific service. ```bash # omv-salt deploy run ``` -------------------------------- ### PHP Namespace and Class Declaration Source: https://docs.openmediavault.org/en/8.x/development/coding_guideline.html PHP classes must use the OMV namespace. This example shows a typical class declaration with a trait. ```php namespace OMV\System; /** * @ingroup api */ class Process { use \OMV\DebugTrait; ... } ``` -------------------------------- ### List available deployment states Source: https://docs.openmediavault.org/en/8.x/development/tools/omv_salt.html Displays all available deployment states managed by omv-salt. ```bash # omv-salt deploy list ``` -------------------------------- ### Inspect mntent entry in config.xml Source: https://docs.openmediavault.org/en/8.x/administration/storage/filesystems.html This XML structure represents a mounted filesystem entry in OpenMediaVault's configuration file. It contains essential details like UUID, device path, mount directory, filesystem type, and options. ```xml f767ee54-eb3a-44c5-b159-1840a289c84b /dev/disk/by-label/VOLUME1 /srv/dev-disk-by-label-VOLUME1 ext4 defaults,nofail,user_xattr,aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2 0 ``` -------------------------------- ### Enumerate Mounted Filesystems with omv-rpc Source: https://docs.openmediavault.org/en/8.x/development/tools/omv_rpc.html Use this command to retrieve a list of all mounted filesystems, including the root filesystem. Ensure you have the 'admin' user privileges. ```bash # omv-rpc -u admin 'FileSystemMgmt' 'enumerateMountedFilesystems' '{"includeroot": true}' ``` -------------------------------- ### Deploy Network Configuration with Salt Source: https://docs.openmediavault.org/en/8.x/installation/on_debian.html Re-deploy the network configuration using OpenMediaVault's salt integration. This command targets the systemd-networkd service. ```bash omv-salt deploy run systemd-networkd ``` -------------------------------- ### Define Filesystem Mount Options Source: https://docs.openmediavault.org/en/8.x/various/fs_env_vars.html Default environment variables for various filesystem types used during mount operations. ```bash OMV_FSTAB_MNTOPS_EXT2="defaults,nofail,user_xattr" OMV_FSTAB_MNTOPS_EXT3="defaults,nofail,user_xattr,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0" OMV_FSTAB_MNTOPS_EXT4="defaults,nofail,user_xattr,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0" OMV_FSTAB_MNTOPS_JFS="defaults,nofail,usrquota,grpquota" OMV_FSTAB_MNTOPS_XFS="defaults,nofail,usrquota,grpquota" OMV_FSTAB_MNTOPS_VFAT="defaults,nofail" OMV_FSTAB_MNTOPS_NTFS="defaults,nofail" OMV_FSTAB_MNTOPS_HFSPLUS="defaults,nofail,force" OMV_FSTAB_MNTOPS_BTRFS="defaults,nofail" OMV_FSTAB_MNTOPS_ISO9660="ro" OMV_FSTAB_MNTOPS_UDF="ro" ``` -------------------------------- ### Reading database values Source: https://docs.openmediavault.org/en/8.x/development/tools/omv_confdbadm.html Retrieve configuration data using a specific datamodel path. ```bash # omv-confdbadm read --prettify conf.system.filesystem.mountpoint ``` -------------------------------- ### Deploy specific states Source: https://docs.openmediavault.org/en/8.x/development/tools/omv_salt.html Applies configuration changes for one or more specified services. ```bash # omv-salt deploy run ... # omv-salt deploy run avahi monit systemd ``` -------------------------------- ### Deploy dirty states Source: https://docs.openmediavault.org/en/8.x/development/tools/omv_salt.html Applies only the configuration states currently marked as dirty. ```bash # omv-salt deploy run –append-dirty ``` -------------------------------- ### List environment variables Source: https://docs.openmediavault.org/en/8.x/administration/general/network.html Displays the current value of the ZEROCONF_ENABLED environment variable. ```bash # omv-env list | grep ZEROCONF_ENABLED ``` -------------------------------- ### SMB Settings RPC Response Source: https://docs.openmediavault.org/en/8.x/development/howitworks.html JSON response containing the current SMB configuration settings. ```json { "response":{ "enable":true, "workgroup":"HOME", "serverstring":"%h server", "loglevel":0, "usesendfile":true, "aio":true, "nullpasswords":false, "localmaster":false, "timeserver":false, "winssupport":false, "winsserver":"", "homesenable":false, "homesbrowseable":true, "extraoptions":"" }, "error":null } ``` -------------------------------- ### Burn ISO to USB with dd Source: https://docs.openmediavault.org/en/8.x/installation/via_iso.html Use the dd utility on Linux to write an ISO image to a USB drive. Ensure 'xxx.iso' is replaced with your ISO file and '/dev/sdX' with the correct USB device. ```bash sudo dd if=xxx.iso of=/dev/sdX bs=4096 ``` -------------------------------- ### Doxygen Documentation Comment for getList with Parameters Source: https://docs.openmediavault.org/en/8.x/development/coding_guideline.html A Doxygen-style documentation comment for a PHP method that retrieves a list of objects, detailing input parameters and return structure. ```php /** * Enumerate all disk devices on the system. The field \em hdparm will * be added to the hard disk objects if there exists additional hard * disk parameters (e.g. S.M.A.R.T. or AAM) that can be defined * individually per hard disk. * @param array data An array containing the following fields: * \em start The index where to start. * \em limit The number of objects to process. * \em sortfield The name of the column used to sort. * \em sortdir The sort direction, ASC or DESC. * @return array An array containing the requested objects. The field * \em total contains the total number of objects, \em data contains * the object array. An exception will be thrown in case of an error. */ public function getList($data) { ... } ``` -------------------------------- ### Zero Superblock for Disk Preparation Source: https://docs.openmediavault.org/en/8.x/administration/storage/raid.html Before adding a disk to an array or if it was previously used in an mdadm array, zero the superblock to ensure clean preparation. This is a crucial step for disk integrity. ```bash mdadm --zero-superblock /dev/sdX ``` -------------------------------- ### OpenMediaVault Cron Job Configuration File Source: https://docs.openmediavault.org/en/8.x/administration/general/cron.html This file, `/etc/cron.d/openmediavault-userdefined`, is automatically generated by openmediavault to manage user-defined cron jobs. Each line specifies the schedule, user, and command to execute. ```shell SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command 12 18 * * * root /var/lib/openmediavault/cron.d/userdefined-04dc9701-881f-4440-93e2-66c385df4068 | mail -E -s "Cron - Movies" -a "From: Cron Daemon " root >/dev/null 2>&1 50 18 * * * root /var/lib/openmediavault/cron.d/userdefined-69a1cf21-3099-4d37-bb8f-df3fecfac988 >/dev/null 2>&1 @daily root /var/lib/openmediavault/cron.d/userdefined-f04f0bbb-03d3-4d45-9efb-e1e980cbbaf3 >/dev/null 2>&1 ``` -------------------------------- ### Configure CPU Frequency Scaling Source: https://docs.openmediavault.org/en/8.x/administration/general/powermanagement.html Defines the governor and speed limits for CPU frequency scaling on x86 architectures. ```bash ENABLE="true" GOVERNOR="conservative" MAX_SPEED="0" MIN_SPEED="0" ``` -------------------------------- ### OpenMediaVault RSync Cron Job Configuration Source: https://docs.openmediavault.org/en/8.x/administration/services/rsync.html A sample auto-generated RSync job configuration file used by OpenMediaVault. This script handles the synchronization process, including SSH key management and error handling. ```shell #!/bin/sh # This configuration file is auto-generated. # WARNING: Do not edit this file, your changes will be lost. . /usr/share/openmediavault/scripts/helper-functions cleanup() { omv_kill_children $$ rm -f /var/run/rsync-05260f23-5098-4f07-9250-0b38b923ac7f exit } [ -e /var/run/rsync-05260f23-5098-4f07-9250-0b38b923ac7f ] && exit 1 if ! omv_is_mounted "/srv/dev-disk-by-label-VOLUME1/" ; then omv_error "Source storage device not mounted at !" exit 1 fi trap cleanup 0 1 2 5 15 touch /var/run/rsync-05260f23-5098-4f07-9250-0b38b923ac7f omv_log "Please wait, syncing to ...\n" eval $(ssh-agent) >/dev/null ssh-add /etc/ssh/openmediavault-484a6837-5170-468c-aa8f-0e3cb92a641e >/dev/null rsync --verbose --log-file="/var/log/rsync.log" --rsh "ssh -p 22" --recursive --times --archive --perms '/srv/dev-disk-by-label-VOLUME1/backupdir/' 'username@backupserver.com:/opt/backup' & wait $! omv_log "\nThe synchronisation has completed successfully." ```