On 01/21/18 21:17, Adrian Sevcenco wrote:
> On 01/21/2018 02:12 PM, Ed Greshko wrote:
>> On 01/21/18 19:02, Adrian Sevcenco wrote:
>>> so, i had to create mytftp.service with the content as above that works as
>>> expected, and i have the freedom to start and stop whenever i chose to..
>>
>>
>> What command do you use to stop/start mytftp.service and how does that 
>> differ from
>> "systemctl stop/start tftp.socket"?
> hmm, well, this brings the question (originated from my lack of knowledge of
> systemd) :
> if the tftp.service is started by socket activation, will "systemctl stop
> tftp.socket" also stop tftp.service?

Yes, it does.....

[root@f27k system]# systemctl status tftp.socket
● tftp.socket - Tftp Server Activation Socket
   Loaded: loaded (/usr/lib/systemd/system/tftp.socket; enabled; vendor preset: 
dis
   Active: active (listening) since Sun 2018-01-21 21:49:54 CST; 3s ago
   Listen: [::]:69 (Datagram)

[root@f27k system]# ps -eaf | grep tftp
root      2983  1909  0 21:50 pts/2    00:00:00 grep --color=auto tftp

So, the socket is activated but no in.tftpd service is running.

Now, I do an "nc" on a remote system to activate....

[egreshko@meimei ~]$ nc -u 192.168.1.191 69
helo

And now we see....

[root@f27k system]# ps -eaf | grep tftp
root      2984     1  0 21:51 ?        00:00:00 /usr/sbin/in.tftpd -s 
/var/lib/tftpboot
root      2987  1909  0 21:52 pts/2    00:00:00 grep --color=auto tftp

[root@f27k system]# systemctl stop tftp.socket

[root@f27k system]# ps -eaf | grep tftp
root      2991  1909  0 21:52 pts/2    00:00:00 grep --color=auto tftp

>
> and to answer the question : of course
> systemctl <verb> mytftp.service
> like any other systemd services

So, really, your exercise wasn't need.


-- 
Fedora Users List - The place to go to speculate endlessly

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org

Reply via email to