Page MenuHomeDevCentral

Allow to create rc service file
AcceptedPublic

Authored by dereckson on Sat, Nov 2, 13:57.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 21, 23:13
Unknown Object (File)
Tue, Nov 19, 07:39
Unknown Object (File)
Sat, Nov 16, 17:19
Unknown Object (File)
Sat, Nov 16, 14:29
Unknown Object (File)
Sat, Nov 16, 11:36
Unknown Object (File)
Sat, Nov 16, 03:11
Unknown Object (File)
Sat, Nov 16, 00:22
Unknown Object (File)
Fri, Nov 15, 22:22
Subscribers
None

Details

Reviewers
DorianWinty
Summary

Automate service.sls and /etc/rc.conf.d provisioning.

The mechanism is generic enough to be able to write other templates too.

Variables are replaced with:

  • keys from _resources/templates/templates.yml
  • values from the command line last arguments

The following special variables are replaced:

  • %%path%% for current file (e.g. roles/foo/bar/files/bar.cfg)
  • %%cwd%% for current directory (normally roles/foo/bar)

Usage: /path/to/utils/templates/create.py service <service name>

Test Plan

Service of D3570 has been generated with:

$ cd roles/shellserver/bitlbee
$ ../../utils/templates/create.py service bitlbee

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Passed
Unit
No Test Coverage
Branch
template-mechanism (branched from main)
Build Status
Buildable 5670
Build 5952: arc lint + arc unit

Event Timeline

dereckson created this revision.
This revision is now accepted and ready to land.Mon, Nov 18, 18:28