Skip to content

fredrik-hammar/sysctl-conf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sysctl-conf

example workflow

Program to parse sysctl.conf(5) formatted documents as an assignment for Miletos employment.

To test the program please run it with example file provided like this:

$ cargo run sysctl.conf
Sysctl { variable: "endpoint", value: Str("localhost:3000"), ignore_failure: false }
Sysctl { variable: "debug", value: Bool(true), ignore_failure: false }
Sysctl { variable: "log.file", value: Str("/var/log/console.log"), ignore_failure: false }

Each line represents the variable to set, the value to set it to, and whether failing to set it should be ignored.

You can also provide a schema to validate the type of the values.

$ cargo run sysctl.conf sysctl.schema
Sysctl { variable: "endpoint", value: Str("localhost:3000"), ignore_failure: false }
Sysctl { variable: "debug", value: Bool(true), ignore_failure: false }
Sysctl { variable: "log.file", value: Str("/var/log/console.log"), ignore_failure: false }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages