FedoraForum.org - Fedora Support Forums and Community
Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2017
    Location
    Other Planet
    Posts
    17

    Autostart service (systemd)

    I'm quite new with Fedora and linux in general, and don't know many things, one of them - How to autostart systemd service?
    Long story short, I'm using software that requires license server to run. There is license server which was using system V (i'm not sure ) script to start license server.
    This was done by going sudo, /etc/init.d and then execute ./sesinetd start, and it really annoying after every reboot execute this command,
    I made a service with this helpful tutorial: https://gist.github.com/houtianze/59...1d3c4bd86e6ee7
    so now after reboot, I can write - sudo service sesinetd start
    all works, but how to start this automatically?

  2. #2
    Join Date
    Jan 2010
    Posts
    7,198

    Re: Autostart service (systemd)


  3. #3
    Join Date
    Dec 2007
    Location
    Australia
    Posts
    1,675

    Re: Autostart service (systemd)

    This was done by going sudo, /etc/init.d and then execute ./sesinetd start, and it really annoying after every reboot execute this command,
    I made a service with this helpful tutorial: https://gist.github.com/houtianze/59...1d3c4bd86e6ee7
    so now after reboot, I can write - sudo service sesinetd start
    all works, but how to start this automatically?
    Since you have a sysvinit script, I think all you have to do to have it start on boot is to tell chkconfig which runlevels it's to run on, e.g.:
    Code:
    chkconfig -level 345 sesinetd on
    should start the script at boot on runlevels 3, 4 and 5.

    systemd runs the scripts linked at /etc/systemd/system, but I think you need a systemd config in /usr/lib/systemd/system for that.

  4. #4
    Join Date
    Sep 2017
    Location
    Other Planet
    Posts
    17

    Re: Autostart service (systemd)

    hm. maybe I'm doing something wrong but still the same thing. no autostart. but after enabling services I get something:
    sudo systemctl enable sesinetd
    Synchronizing state of sesinetd.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
    so probably made something wrong. I'm not sure.

  5. #5
    Join Date
    Dec 2007
    Location
    Australia
    Posts
    1,675

    Re: Autostart service (systemd)

    Perhaps have a look at this explanation:
    https://www.turnkeylinux.org/blog/de...sv-init-compat

    Dunno if it'll help.

    Just thinking, what would happen if you enable the system-sysv-install service with: systemctl enable ....? I suppose it would be sesinitd to enable if systemd has configured it into itself. I'd try it anyway.
    Last edited by nsnbm; 9th January 2018 at 11:29 PM.

  6. #6
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    4,735

    Re: Autostart service (systemd)

    Since it is a server, why not put the restart command into a crontab with a line that starts. @reboot. You could even do the automatic restart a few minutes after the true reboot. The advantage is that it is a one liner for crontab. Use root for the crontab. Do not forget to put the appropriate PATH statement or launch a shell command that does it for you.
    .
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

Similar Threads

  1. [SOLVED] Creating a custom systemd service
    By matth45 in forum Using Fedora
    Replies: 3
    Last Post: 22nd July 2016, 08:20 PM
  2. Systemd 'service' script not running
    By roshichris in forum Using Fedora
    Replies: 7
    Last Post: 7th August 2015, 07:17 PM
  3. ip_forward systemd service
    By bienchen in forum Servers & Networking
    Replies: 3
    Last Post: 13th March 2014, 10:12 AM
  4. systemd user service manager support (systemd --user)
    By survient in forum Using Fedora
    Replies: 2
    Last Post: 5th December 2013, 04:52 PM
  5. How to disable a systemd service?
    By Japplo in forum F16 Development
    Replies: 8
    Last Post: 5th September 2011, 01:11 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •