0.1.4 • Published 5 years ago

samba-config v0.1.4

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

samba-config

Super tiny library for configuring samba shares with Javascript.

Functionalites

  • generateShareConfig: Generate configuration for a new samba share.
    	```javascript
    		 generateShareConfig: function (shareName, params)
    	```

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.
	generateSection: function (shareName, fileName, existingConfig)

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.
	updateConfig: function (configPath, sectionFileName, sectionName, sectionParams)

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.updateConfig('/etc/samba/smb.conf', 'developer.share.conf', 'developer', {path: '/srv/smb/developer'})

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

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago