FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 11-28-2011, 07:00 PM
David Highley
 
Default Create an rsyncd.service fedora 16

"T.C. Hollingsworth wrote:"
>
> On Mon, Nov 28, 2011 at 10:42 AM, David Highley
> <dhighley@highley-recommended.com> wrote:
> > "David Highley wrote:"
> >> Looked at the openvpn@.service script and see the type=forking
> >> statement. We added this but with the above issue not able to tell if it
> >> helped. The document on systemd.exec still leaves us wondering where and
> >> which file to insert the StandardInput statement. Will look at more
> >> scripts to see if we can determine the correct location.
>
> "Type=forking" doesn't work with inetd-style daemons; by definition
> they cannot fork. openvpn isn't an inetd-style service, it uses the @
> in a different manner, because it can be started with more than one
> configuration file, as opposed to more than one socket like
> rsyncd/inetd services.
>
> StandardInput does go into the [Service] section of the .service file;
> that was done correctly.
>
> > Just to be clear we now have:
> <snipped>
>
> I double-checked a few details and there are some other things that
> need to be fixed:
>
> EnvironmentFile is incorrect. EnvironmentFile is generally used for
> things in /etc/sysconfig, and can only contain a list of environment
> variables that are passed to the Exec lines. (e.g. you might have
> "PORT=8080" in /etc/sysconfig/foobar and "ExecStart=/usr/sbin/foobar
> -p $PORT"). This line can be removed.
>
> inetd-style services don't need an [Install] section in the .service
> file at all; that's only necessary for services that use systemd's new
> socket activation features. So that section can also be removed.
>
> "After=socket.target" is implicit in F16, it's a part of
> DefaultDependencies. So it can be safely removed, but doesn't hurt
> anything if it stays. (I mention this only because I removed it out
> of habit in my below example, it doesn't matter if it stays or goes.)
>
> So, your final files should look like:
> https://gist.github.com/1401352
>
> That should work just fine. Remember, you need to operate on the
> socket, not the service. systemd will start the service itself when
> users connect to it. So, to enable the socket to start when your
> computer starts, run:
> systemctl enable rsyncd.socket

It is now working, operating on rsyncd.socket was not obvious to us
instead of the service. Made the last few changes as well to clean it
up. We greatly appreciate the information and help in getting this to
work.

>
> To start the rsyncd socket so accepts connections right now, run:
> systemctl start rsyncd.socket
>
> -T.C.
> --
> users mailing list
> users@lists.fedoraproject.org
> To unsubscribe or change subscription options:
> https://admin.fedoraproject.org/mailman/listinfo/users
> Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
> Have a question? Ask away: http://ask.fedoraproject.org
>
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 11-28-2011, 11:57 PM
David Highley
 
Default Create an rsyncd.service fedora 16

"David Highley wrote:"
>
> "T.C. Hollingsworth wrote:"

Thanks to T.C. Hollingsworth for helping us implement this service.
Steps to creating an rsyncd service that works with systemd on fedora
16.

Create configuration for rsyncd server.
- mkdir /etc/rsyncd
- touch /etc/rsyncd.motd
- touch /etc/rsyncd.secrets
- edit /etc/rsyncd.conf
pid file=/var/run/rsyncd.pid
port=873
address=<server address>
uid=root
gid=root
use chroot=yes
read only=no

# limit access to from allowed hosts only
hosts allow=<space separated host addresses>
hosts deny=*

motd file=/etc/rsyncd/rsyncd.motd

log format=%t%a%m%f%b
log file=/var/log/rsyncd.log
timeout=300

[module name]
path=
list=yes
#secrets file=/etc/rsysncd/rsyncd.secrets
comment=<module comment string>


In the directory /lib/systemd/system create two files.
- rsyncd@.service
[Unit]
Description=rsyncd Rsync Daemon
After=syslog.target network.target

[Service]
ExecStart=/usr/bin/rsync --config=/etc/rsyncd/rsyncd.conf --daemon
StandardInput=socket

- rsyncd.socket
[Unit]
Description=rsyncd Service Sockets

[Socket]
ListenStream=873
Accept=yes

[Install]
WantedBy=sockets.target

Reload systemd daemon, enable and start the service.
- systemctl --system daemon-reload
- systemctl enable rsyncd.socket
- systemctl start rsyncd.socket

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 

Thread Tools




All times are GMT. The time now is 04:17 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org