LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-13-2022, 07:05 PM   #1
shanebagel
Member
 
Registered: Apr 2022
Posts: 52

Rep: Reputation: 2
Unhappy Systemd is not starting another unit?


I have a systemd unit called httpd
I want it to run vsftpd at the same time
Here is the unit file configuration for httpd


[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
Before=vsftpd.target
Restart=10s

Documentation=man:httpd(8)
Documentation=man:apachectl(8)


These are the only changes I made in bold
I ran daemon-reload and restarted both units
I then started httpd and vsftpd is still not running


Why won't systemd run the other unit? What am I doing wrong?
 
Old 06-13-2022, 07:33 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Did you you really start vsftpd.service unit?

Did you check "systemctl status vsftpd.service" and "journalctl -u vsftpd.service"?

Evo2.
 
Old 06-13-2022, 09:53 PM   #3
shanebagel
Member
 
Registered: Apr 2022
Posts: 52

Original Poster
Rep: Reputation: 2
So if I add the unit with Requires/Before/After into the unit configuration file, and then restart the httpd service (which specifies the vsftpd service to run with with the dependency clause) - should it not start the vsftpd service?
 
Old 06-13-2022, 10:19 PM   #4
shanebagel
Member
 
Registered: Apr 2022
Posts: 52

Original Poster
Rep: Reputation: 2
Oh my god - I found out what I was doing wrong.
In the unit configuration file I was typing out vsftpd.target INSTEAD OF vsftpd.service. vsftpd is not a target so systemd didn't have anything to start. I changed it to vsftpd.service - ran the httpd unit and now the vsftpd unit is running.
Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] systemd unit file starts and runs fine manually but not on bootup taylorkh Linux - General 11 01-06-2019 06:08 PM
How do we get my UNIT(service) name in unit.sevice Boobalan M Linux - Software 6 01-23-2018 05:03 AM
[SOLVED] systemd unit does not load at startup. manual start shows no such file/dir failure zjmarlow Linux - Newbie 9 07-19-2015 06:19 AM
[SOLVED] Starting File System .. Starting File System .. Starting File System .. Starting File rmknox Linux - Newbie 3 08-15-2010 11:30 PM
Storage unit and IO unit salmanucit Linux - General 2 06-17-2008 11:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration