LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 10-15-2012, 05:21 AM   #1
igor012
Member
 
Registered: Feb 2010
Posts: 87

Rep: Reputation: 2
Convert init script to systemd file service


Hello,
On OpenSUSE I am trying to convert one of my init script to a systemd service file.

Here is what I wrote
Code:
[Unit]
Description=myscript
# 
#Requires=
# 
#After=syslog.target

[Service]
ExecStart=/bin/bash -c "if [ -f /opt/script.py ]; then /usr/bin/python /opt/script.py; fi"
# 
# 
Type=forking
PIDFile=/var/run/script.pid

[Install]
WantedBy=multi-user.target
When starting it, it fails.

What did I miss ?

Thanks

Last edited by igor012; 10-15-2012 at 05:53 AM.
 
Old 10-15-2012, 11:05 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,561
Blog Entries: 54

Rep: Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927
Quote:
Originally Posted by igor012 View Post
When starting it, it fails.
Stdout, stderr, debug mode, syslog, any clues? What does it fail on?
 
  


Reply

Tags
init, python, systemd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
systemd: replacing an init script for cpu scaling governors Meson Linux - Software 3 08-29-2012 02:24 PM
LXer: Here We Go Again, Another Linux Init: Intro to systemd LXer Syndicated Linux News 0 12-13-2011 08:51 PM
[SOLVED] init.d script - /sbin/service: line 66: 23002 Terminated wazzgod Linux - Software 2 10-29-2011 11:06 AM
Boot Delay 30min: systemd-analyze blame systemd-tmpfiles-setup.service BGHolmes Fedora 0 07-27-2011 10:02 AM
Informaton on systemd init system? arashi256 Linux - Newbie 1 06-04-2011 08:06 PM


All times are GMT -5. The time now is 06:48 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration