I would not recommend running hypnotoad as a Type=simple service with -f.
This will not allow you to use hot-restarts via systemctl reload.

-Dan

On Thu, Nov 23, 2017 at 10:13 AM, <b.duf...@keele.ac.uk> wrote:

> Hi David,
>
> I'm no expert with systemd, but this is my mojo.service file which runs
> the application in /usr/local/manager-application and works for me.   My
> differences are in the Service tag.
> mojo.service
> [Unit]
> Description=My Mojolicious application
> Requires=network.target
> After=network.target
>
> [Service]
> Type=simple
> RemainAfterExit=yes
> SyslogIdentifier=mojolicious
>
> WorkingDirectory=/usr/local/manager-application
> ExecStart=/usr/local/bin/hypnotoad script/manager_app -f
> ExecStop=/usr/local/bin/hypnotoad --stop script/manager_app
> ExecReload=/usr/local/bin/hypnotoad script/manager_app
> <http://mojo_test.pl>
>
> Restart=on-abort
> RestartSec=90s
>
> [Install]
> WantedBy=multi-user.target
>
> running
> CentOS 7
> perl 5.16.3
> mojolcious 6.58
>
> (file transcribed by hand, so watch for speling mistakes)  HTH
>
> Boyd
>
> On Thursday, 23 November 2017 09:24:40 UTC, davi...@gmail.com wrote:
>>
>> Dear sir;
>>      I meet a problem when systemd start hypnotoad, detail follow:
>>
>>
>> mojo_test.service
>> [Unit]
>> Description=My Mojolicious application
>> Requires=network.target
>> After=network.target
>>
>> [Service]
>> Type=forking
>> PIDFile=/run/mojo_test.pid
>> ExecStart=/usr/local/bin/hypnotoad /home/mojo_test.pl
>> ExecStop=/usr/local/bin/hypnotoad -s /home/mojo_test.pl
>> ExecReload=/usr/local/bin/hypnotoad /home/mojo_test.pl
>> KillMode=process
>>
>> [Install]
>> WantedBy=multi-user.target
>>
>> use /home/hypnotoad mojo_test.pl start to run is ok.
>> the running enviorments:
>> centos 7
>> perl v5.16
>> mojolicious new update
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Mojolicious" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mojolicious+unsubscr...@googlegroups.com.
> To post to this group, send email to mojolicious@googlegroups.com.
> Visit this group at https://groups.google.com/group/mojolicious.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to