Question on systemd service and "After=" directive

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

 



Gogs systemd service (gogs.service) must start after a DB is started.

Gogs can use mysql, mariadb, postgress, ecc db backend.

Now into service all this "After=" are commented and I must modify the
gogs.service file and comment out the right After entry

> [Unit]
> Description=Gogs
> After=syslog.target
> After=network.target
> #After=mysqld.service
> #After=mariadb.service
> #After=postgresql.service
> #After=memcached.service
> #After=redis.service
> 
> [Service]
https://github.com/gogits/gogs/blob/master/scripts/systemd/gogs.service

Now I have modify the gogs.service file, but I'm looking for a way to
avoid modify the unit file

It's possible set After with all db service gogs needs, also if the
some named services are non installed, something like this, or leave
all After= directive uncommented:

    After=aaa.service bbb.service ccc.service

If not, there is a way to avoid modify the unit file and put into it
something like this?

    AfterIfExist=aaa.service bbb.service ccc.service

    or another directive ?

    Many thanks for your suggest.

    -- 
    Dario Lesca
    (inviato dal mio Linux Fedora 25 Workstation)
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[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