LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-18-2016, 11:39 AM   #1
aagaag
Member
 
Registered: Aug 2014
Posts: 42

Rep: Reputation: Disabled
systemd service


I am trying to play with systemd in order to understand it better. For starters, I would like to create a systemd service that copies a bunch of files from one place to another, and to execute it every 5 minutes. So I created the file "/etc/systemd/system/copy_munin_files_to_kellerpc.service" which contains:
Code:
[Service]
User=aag
Type=oneshot
ExecStart=cp /data/munin /home/aag
Now, this does not work. What else do I need to make it work?
 
Old 01-18-2016, 07:42 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Depends. I'm no expert, specially on systemd, but if you have either /data or /home as mountable devices, it may not yet be mounted at the time it runs. You have no dependencies specified, and without that it will run as soon as the system boots - and it would fail.

There ought to be some log entries with at least some reason for the failure.

Last edited by jpollard; 01-18-2016 at 07:43 PM.
 
  


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
How to write slow, blocking systemd shutdown service? charlweed Linux - General 9 03-22-2019 03:22 PM
redhat 7 systemd failed service on boot bishop2001 Red Hat 1 12-24-2015 04:04 PM
How to pass options to service started with systemd? PelleP Linux - Software 3 10-14-2014 03:45 AM
[SOLVED] new Sabayon 13.04 install: Can't get GPM to start as a service... {systemd} jtwdyp Sabayon 2 06-16-2013 12:46 PM
Boot Delay 30min: systemd-analyze blame systemd-tmpfiles-setup.service BGHolmes Fedora 0 07-27-2011 09:02 AM

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

All times are GMT -5. The time now is 04:58 AM.

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