On Tuesday, March 15, 2016 at 6:49:44 PM UTC-7, Michael M wrote:
>
> So some googling later for "Persistant Python script Rhel7 service"
> I changed the service to the following and now the service will run.
>
> Thank-you Dave for getting me back to thinking about writing the service 
> correctly.
>

And you've got me studying 
<URL:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-Managing_Services_with_systemd-Services.html
>

I'm on section 8.2 so far.


 

>
> Between the dashes below is this file:  
>
> "/etc/systemd/system/web2py-scheduler.service"
>
> And can be activated via:
>
> "systemctl enable web2py-scheduler.service"
> "systemctl start web2py-scheduler.service"
>
> -------------
> [Unit]
> Description=Web2py Scheduler service
>
> [Service]
> ExecStart=/usr/bin/python /opt/www-data/web2py/web2py.py -K 
> networktools,networktools,networktools
> Type=simple
>
> [Install]
> WantedBy=multi-user.target
> --------------
>
>
/dps

 

> On Tuesday, March 15, 2016 at 4:43:23 PM UTC-7, Michael M wrote:
>>
>> I read though that a ton of times but I believe RHEL 7 retired that 
>> method in /etc/init/ and conf files and moved to systemd and services.  
>>
>> Ill try the sudo in ExecStart.  And report back.
>>
>> On Tuesday, March 15, 2016 at 3:36:30 PM UTC-7, Dave S wrote:
>>>
>>> On Tuesday, March 15, 2016 at 2:35:40 PM UTC-7, Michael M wrote:
>>>>
>>>> I'm not stuck on getting it running as a Service.  
>>>>
>>>> Just getting it so it runs when the server is power cycled or 
>>>> otherwise.  Insuring that the scheduler is running so it can do DB updates 
>>>> of flat-files that get dumped on the box daily.
>>>>
>>>
>>> It's not clear whether that runs at an appropriate privilege level.  The 
>>> upstart example in the deployment recipes has an explicit sudo in the 
>>> invocation.  Do you need a sudo in your ExecStart?
>>>
>>> <URL:
>>> http://web2py.com/books/default/chapter/29/13/deployment-recipes#Start-the-scheduler-as-a-Linux-service--upstart-
>>> >
>>>
>>> /dps
>>>
>>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to