07-08-2019
19,118,
3,359
Join Date: Sep 2000
Last Activity: 15 July 2022, 8:51 AM EDT
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
Ravinder,
If it was me, I would download the source code from github and search the source for these kinds of tokens, for example: start/stop/restart and try to find out where in the code these options are processed.
Then, you might find that it's not too difficult of a task to add a custom option to systemd by writing some code and recompiling your custom version of systemd. You might be able to link your new code in dynamically as a "ravinder" module.
The best way to do this, of course, is to fork the systemd code into your own github account, so you can track the changes and perhaps if your changes are interesting to others, they can download from your github page(s) as well. VSC has all the hooks you need to track all changes and manage all version control in the appropriate programming language (I assume C or C++, but have not checked).
I've not looked at the code, but I think it's a viable approach if you want to customize systemd, obviously you will need to modify the source, track changes, etc. and all the source is available.
It's just a matter of "doing it"... after doing your homework a bit more and deciding on where in the architecture to add your custom code.