Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'nicely': 0.07; 'utf-8': 0.07; 'app,': 0.09; 'i\xe2\x80\x99ve': 0.09; 'cc:addr:python- list': 0.11; 'python': 0.11; 'changes': 0.15; 'docs.': 0.16; 'itself,': 0.16; 'package).': 0.16; 'program?': 0.16; 'subject:under': 0.16; 'travis': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'written': 0.21; 'example': 0.22; 'otherwise,': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; '(which': 0.31; 'program,': 0.31; 'sep': 0.31; 'anyone': 0.31; 'file': 0.32; 'linux': 0.33; 'url:python': 0.33; 'running': 0.33; 'sense': 0.34; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'subject:service': 0.36; 'url:listinfo': 0.36; 'subject:?': 0.36; 'url:org': 0.36; 'implement': 0.38; 'depends': 0.38; 'pm,': 0.38; 'does': 0.39; 'launch': 0.39; 'structure': 0.39; 'changed': 0.39; 'url:mail': 0.40; 'how': 0.40; 'details.': 0.61; 'from:charset:utf-8': 0.61; 'more': 0.64; 'skip:\xe2 10': 0.65; 'to:addr:gmail.com': 0.65; 'benefit': 0.68; '8bit%:43': 0.74; 'ships': 0.84; 'magical': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=ceMxiLEdCeDsRjkA+J8mXl1Wtf/gF1Hf0K5Yyd0cyBE=; b=SPNPbCdl2/KNs9kR9fxz235or84VdLDTzX/u6ZTzMad/PmCze8PVIiZldO5NBVf2Jk k60x30YXBdKPUvA2uZqw6cthMomPePnK5wgTBs8s3xGgFVysSZMo6XO5fNprciFsnUuW aw5fIPCOBf7J6iRvMPbLDZ3SC89y+zVFhEo3zZfCOxcLtGqpr/5vmFaG0iLMaot6pQN/ mi+EIK5Ag1ybyuKSdxM3GmPUcbPEVo2H0m6900LVhVlGg4JfgFVR1Q1SXBRoRBJfmz6A Nc+c+Z8XsiXOHtwZfyYAi5wwRpn11I8niHDDKHt6UewC3tYXghaEk/StW5umZiJSpkhE 5b7Q== MIME-Version: 1.0 X-Received: by 10.43.136.134 with SMTP id ik6mr4186656icc.6.1410459535955; Thu, 11 Sep 2014 11:18:55 -0700 (PDT) In-Reply-To: References: Date: Thu, 11 Sep 2014 20:18:55 +0200 Subject: Re: Example of python service running under systemd? From: =?UTF-8?B?Q2hyaXMg4oCcS3dwb2xza2HigJ0gV2Fycmljaw==?= To: Travis Griggs Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1410459538 news.xs4all.nl 2892 [2001:888:2000:d::a6]:59778 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:77773 On Thu, Sep 11, 2014 at 7:48 PM, Travis Griggs wro= te: > I=E2=80=99ve been reading lots of systemd docs. And blogs. Etc. At this p= oint, I think I would benefit from learning by example=E2=80=A6 > > Does anyone have an example .service file that they use to launch a long = running service written as a python program? > > If there is any example of what you changed to your python program itself= , that to would be really instructional for me. > -- > https://mail.python.org/mailman/listinfo/python-list Depends what you want. If you are running a Python web app, you can use uWSGI Emperor, which plugs into systemd nicely and provides a .service file in the docs (which also ships with the Arch Linux package). Otherwise, there are various ways, and this all depends on how you structure this and your needs. Use Type=3Dsimple and you won=E2=80= =99t need any changes to your program, or use one of the more magical methods and implement them. Describe your needs to get more details. --=20 Chris =E2=80=9CKwpolska=E2=80=9D Warrick PGP: 5EAAEA16 stop html mail | always bottom-post | only UTF-8 makes sense