samba-config
Super tiny library for configuring samba shares with Javascript.
Functionalites
- generateShareConfig: Generate configuration for a new samba share.
Params
- shareName: Name of the new share.
- params: JSON with the settings of the new share. The keys inside this JSON are the standard samba share configuration options.
- generateSection: Generate include line into the samba configuration.
Params
- shareName: Name of the new share.
- fileName: Name of the file, which contains the configuration of the new share.
- existingConfig: The already existing Samba configuration object.
- updateConfig: Generate share configuration and include configuration for the new share.
Params
- configpath: Path of the Samba configuration file.
- sectionFileName: Filename of the newly generated share.
- sectionName: Name of the new share.
- sectionParams: Configuration options for the share.
Usage Examples
Generate one share configuration and include them into the samba configuration
await Generator
The main Samba configuration file is in the /etc/samba directory. The name of the new share is develper, the properties for this share is JSON Object: {path: '/srv/smb/developer'} and the name of the share configuration file is developer.share.conf
Change Log
Change log is available: here