Need some advices moving a fedora package from sysVinit to systemd
Jean-Marc Pigeon
jmp at safe.ca
Wed Jun 19 13:57:13 UTC 2013
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 at safe.ca
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">
===========================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5919 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.fedoraproject.org/pipermail/devel/attachments/20130619/cae358e9/attachment.p7s>
More information about the devel
mailing list