You are not logged in.

#1 2015-10-09 04:32:11

joetemp
Member
Registered: 2013-12-16
Posts: 73

My new systemd unit isn't working. Please help.

I'm trying to start a script called 'sync_test1' at startup. Here is my attempt at writing a systemd unit to do the job:

[Unit]                                                                                                                                              
Description=Start sync_test1

[Service]
WorkingDirectory=/home/admin
Type=simple
ExecStart=/bin/bash sync_test1 start
KillMode=process

[Install]
WantedBy=multi-user.target

However... it's not working. What am I doing wrong here? Thanks in advance!

Offline

#2 2015-10-09 04:35:46

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: My new systemd unit isn't working. Please help.

What does not working mean? https://bbs.archlinux.org/viewtopic.php?id=57855


Not a Sysadmin issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2015-10-09 04:42:12

joetemp
Member
Registered: 2013-12-16
Posts: 73

Re: My new systemd unit isn't working. Please help.

This particular script uses inotifywait to watch a dir and rsyncs as soon as a file is added to the watched dir. Nothing happens... So I assume my unit is broken. BTW... This script works when started manually.

Offline

#4 2015-10-09 05:40:39

joetemp
Member
Registered: 2013-12-16
Posts: 73

Re: My new systemd unit isn't working. Please help.

I named this script 'systemd_test.service' and put it in /etc/systemd/system of the machine that's supposed to run the script called 'sync_test1' at startup. I also ran 'systemd enable systemd_test.service'. I'm out of ideas and pretty frustrated. Can anyone help?

Offline

#5 2015-10-09 05:51:08

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: My new systemd unit isn't working. Please help.

jasonwryan wrote:

What does the journal report?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB