Page MenuHomeDevCentral

Allow to create rc service file
ClosedPublic

Authored by dereckson on Nov 2 2024, 13:57.
Tags
None
Referenced Files
F56980754: D3571.id.diff
Thu, Nov 12, 08:48
F56754611: D3571.id9198.diff
Mon, Nov 9, 00:47
F56736195: D3571.diff
Sun, Nov 8, 19:26
F56395202: D3571.id9343.diff
Thu, Nov 5, 18:27
F56344055: D3571.diff
Thu, Nov 5, 06:07
F56013329: D3571.diff
Mon, Nov 2, 03:17
F55955824: D3571.id.diff
Sun, Nov 1, 18:22
Unknown Object (File)
Sat, Oct 31, 08:10
Subscribers
None

Details

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.Nov 18 2024, 18:28
This revision was automatically updated to reflect the committed changes.