Re: Need some advices moving a fedora package from sysVinit to systemd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

Found a solution to update service configuration according component
(namely database) found needed during the application first start.

using file /etc/systemd/system/clement.service
(which is a (RPM no replace) legit configuration file).

contents is
#this is the local configuration file to systemd clement.service
#-------------------------------------------------------------------------
.include /lib/systemd/system/clement.service


On the first application start
systemctl start clement

application autoconfig process notice sysadmin selected a data-base
(lets say 'postgrsql') then autoconfig add to
/etc/systemd/system/clement.service

#added by clement install
[Unit]
After=postgesql.service
Requires=postgresql.service

then auto install issue a
systemctl --system daemon-reload

All is done via ExecStartPre script detecting the very first application
start.

Such, next time, application is started we are sure needed data-base daemon is
up and running.
I believe this keep systemd goal (and implementation) to keep starting
dependency up to date.
I tested this with both MySQL and PostgreSQL and it seems to be
working no trouble.

Comments?

--
A bientôt
===========================================================
Jean-Marc Pigeon                        E-Mail: jmp@xxxxxxx
SAFE Inc.                             Phone: (514) 493-4280
  Clement, 'a kiss solution' to get rid of SPAM (at last)
     Clement' Home base <"http://www.clement.safe.ca";>
===========================================================

<<attachment: smime.p7s>>

-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux