LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 04:21 AM   #1
igor012
Member
 
Registered: Feb 2010
Posts: 89

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 04:53 AM.
 
Old 10-15-2012, 10:05 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:07 PM.

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