Closed satek closed 6 years ago
@satek Thanks to your contribution!!!
I'm considering to change the class name Capistrano::Systemd::MultiService
to Capistrano::Systemd::MultiService::SystemrService
.
(because this gem name is capistrano-systemd-multiservice
, so all modules/classes should be
under Capistrano::Systemd::MultiService
)
I will rename Capistrano::Systemd::MultiService
class in this week.
Capistrano::Systemd::MultiService
to Capistrano::Systemd::MultiService::SystemService
.Capistrano::Systemd::MultiService
that has one singleton method new_service
.After that, rebase to upcomming master and add user service feature in this PR.
Capistrano::Systemd::MultiService::UserService
class. (replacement of your Capistrano::Systemd::UserMultiService
class)user_service
keyword argument to Capistrano::Systemd::MultiService.new_service
method.Sounds good to me, @minimum2scp. I'll keep an eye out for the changes you described.
@satek
Please take a look at #10, and rebase to (or merge) latest master.
Hi @minimum2scp, apologies for the delay on this.
Please see the update. Not much has changed in the update since the SystemService class hasn't changed. I added a new optional parameter to the new_service
method to pick the service class to use and it defaults to system
so it shouldn't affect existing users. If it's not to your liking I can change the way the class selected.
@satek Thanks, nice work!
Please bump version to 0.1.0.beta7
,
https://github.com/groovenauts/capistrano-systemd-multiservice/blob/0344ff8c93db8c75cf08e2f3c939429659deb164/lib/capistrano/systemd/multiservice/version.rb#L4
and then I will merge this PR and release gem.
Thanks, @minimum2scp. Done.
@satek Released as 0.1.0.beta7, thanks!!! https://github.com/groovenauts/capistrano-systemd-multiservice/releases/tag/v0.1.0.beta7 https://rubygems.org/gems/capistrano-systemd-multiservice/versions/0.1.0.beta7
Hi! I needed services to be deployed in the user directory so that they could be managed like so for example:
systemctl --user list-unit-files
. To that end I created a subclass ofMultiService
calledUserMultiService
. The difference is in default directory location and in the way commands are executed - user services don't need sudo permission. I kept changes to the base class as minimal as possible so existing functionality should remain unaffected. The biggest change is actually to the specs - cause I needed to test all the same cases without having duplication, I extracted all the examples into the shared directory and used them for both classes.Let me know please if you see any problems with this and would you have interest in merging the changes upstream.