systemd startup script

Nagy Ákos nagy.akos at codespring.ro
Fri May 6 12:25:27 UTC 2016


2016. 05. 06. 14:58 keltezéssel, Georges Racinet írta:
> Hi,
>
> On 05/06/2016 01:51 PM, Nagy Ákos wrote:
>> Hi,
>>
>> I wrote a systemd startus script, and test it on Ubuntu 16.04.
>> I try to create a pull request, but i'm not familiar with it.
> I'm just a reader here, but I wonder why you use the forking style and
> not simply run in the foreground and let systemd handle the
> daemonization (as you did with celery)
I don't know exacly the difference between simple and forking...
First I create script for kallithea, and I left with type=forking, but 
probably work with type=simple too.
Celeryd work only with type=simple.


>> kallithea.service:
>> [Unit]
>> Description=Kallithea daemon
>> Requires=celeryd.service
>>
>> [Service]
>> PIDFile=/srv/kallithea/kallithea.pid
>> Type=forking
>> User=kallithea
>> Group=kallithea
>> WorkingDirectory=/srv/kallithea/
>> Environment=VIRTUAL_ENV="$STATEDIR/venv"
>> Environment=PATH="$VIRTUAL_ENV/bin:$PATH"
>> ExecStart=/srv/kallithea/venv/bin/paster serve /srv/kallithea/my.ini
>> --daemon --pid-file=/srv/kallithea/kallithea.pid
>> --log-file=/srv/kallithea/kallithea.log
>>
>> [Install]
>> WantedBy=multi-user.target
>>
>> celeryd.service:
>> [Unit]
>> Description=Celeryd daemon start
>>
>> [Service]
>> PIDFile=/srv/kallithea/celeryd.pid
>> Type=simple
>> User=kallithea
>> Group=kallithea
>> WorkingDirectory=/srv/kallithea/
>> Environment=VIRTUAL_ENV="$STATEDIR/venv"
>> Environment=PATH="$VIRTUAL_ENV/bin:$PATH"
>> ExecStart=/srv/kallithea/venv/bin/paster celeryd /srv/kallithea/my.ini
>> --pidfile=/srv/kallithea/celeryd.pid --logfile=/srv/kallithea/celeryd.log
>>
>> [Install]
>> WantedBy=multi-user.target
>>
>>
>


-- 
Nagy Ákos
0748219066
SC Softech SRL
Str. Frunzisului, Nr. 29
400664 Cluj



More information about the kallithea-general mailing list