Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "create-service", Short: "Create systemd service file", Aliases: []string{"cs"}, Args: cobra.NoArgs, Run: func(c *cobra.Command, args []string) { out, err := systemd_utils.CreateSystemdServiceString( FlagName, FlagDescription, FlagUser, FlagGroup, FlagWorkingDirectory, FlagExecStart, ) if err != nil { log.Fatalln(err) } if FlagCreateFile { err := os.WriteFile( "/etc/systemd/system/"+FlagName+".service", []byte(out), 0644) if err != nil { log.Fatalln(err) } } else { fmt.Println(out) } }, }
View Source
var FlagCreateFile bool
View Source
var FlagDescription string
View Source
var FlagExecStart string
View Source
var FlagGroup string
View Source
var FlagName string
View Source
var FlagUser string
View Source
var FlagWorkingDirectory string
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.