fix(systemd): include service user in service file generation
* Add ServiceUser field to Config struct for user specification. * Update Generate and Install functions to accept service user. * Modify tests to reflect changes in service user handling.
This commit is contained in:
@@ -27,8 +27,8 @@ func UnitPath(u config.Unit, prefix, suffix string) (string, error) {
|
||||
}
|
||||
|
||||
// Install writes the .service file for a unit and reloads systemd.
|
||||
func Install(u config.Unit, prefix, suffix string) error {
|
||||
content, err := Generate(u, prefix, suffix)
|
||||
func Install(u config.Unit, prefix, suffix, serviceUser string) error {
|
||||
content, err := Generate(u, prefix, suffix, serviceUser)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user