[sr-dev] Install scripts and /var/run/kamailio

Olle E. Johansson oej at edvina.net
Thu Oct 1 15:43:04 CEST 2015


> On 14 Sep 2015, at 23:26, Daniel-Constantin Mierla <miconda at gmail.com> wrote:
> 
> The situation is quite annoying sometimes even for me, I was thinking of
> ways to make it more convenient when installing sources and starting
> with a command line or running from source tree as I do most of the time.
> 
> The /var/run/kamailio is not created by debian installation process,
> because /var/run is temporary and content deleted on each restart. It
> was like that but changed when discovered, because even installed from
> deb, after the restart of the system, kamailio won't start. Same happens
> if done with 'make install', it will work up to next system restart.
> 
> Right now the /var/run/kamailio is created by the init.d script
> /etc/init.d/kamailio, which seems to be the common across other linux
> daemons.
> 
> On debian, the init.d script can be deployed and /var/run/kamailio/
> created by running:
> 
> make install-initd-debian
> 
> There is an alternative for centos:
> 
> make install-initd-centos
> 
> Just noticed it doesn't create the folder, patch will follow (although
> it might be created by user add command).
> 
> I will add a dedicated Makefile target to create the folder, but a
> complete procedure will require adding the user and changing the owner
> of the folder, if kamailio is started under that specific user.
> 
> Among ideas I played with:
> 
> - create the folder from kamailio source at startup, if it doesn't
> exist and enough privileges -- this will require to start kamailio
> initially as root
If we depend on it we should definitely create it unless already created.
I think depending upon LInux scripts is not the right way. Or we should
just go back to /tmp as a default in the source code and make it a compile
time option. That way, debian packaging can compile with another default.

> - make it an easy option to set run dir to standard /var/run/kamailio
> or to /tmp, each to be selected based on needs (like installation to
> generate packages or installation from sources for testing) -- this will
> make life easier when running from source tree
Right.

/O
> 
> Suggestions to make this easier to cope with are welcome!
> 
> Cheers,
> Daniel
> 
> On 14/09/15 19:58, Olle E. Johansson wrote:
>> What not create IT?
>> 
>> Edvina AB
>> 
>>> 14 sep 2015 kl. 17:48 skrev Fred Posner <fred at palner.com>:
>>> 
>>>> On 09/14/2015 12:36 PM, Olle E. Johansson wrote:
>>>> Just a note so I don’t forget:
>>>> 
>>>> When doing training we installed a few computers from tarballs, and
>>>> got problems running the default script - install doesn’t seem to
>>>> create /var/run/kamailio which is now a default for some options.
>>>> 
>>>> We propably need to make sure this directory is created by standard
>>>> install, not just by the RPM/DEB installs.
>>>> 
>>>> /O
>>> I know in the install tutorial, it's noted (as well as giving permission
>>> to the kamailio user)
>>> 
>>> http://www.kamailio.org/wiki/install/4.3.x/git
>>> 
>>> It's also linked to from the github README.md file but could be
>>> documented better in the README and INSTALL files.
>>> 
>>> Fred Posner
>>> fred at palner.com
>>> <0x6235BD69.asc>
>>> _______________________________________________
>>> sr-dev mailing list
>>> sr-dev at lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>> _______________________________________________
>> sr-dev mailing list
>> sr-dev at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
> 
> -- 
> Daniel-Constantin Mierla
> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
> Book: SIP Routing With Kamailio - http://www.asipto.com
> Kamailio Advanced Training, Sep 28-30, 2015, in Berlin - http://asipto.com/u/kat
> 
> 
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev




More information about the sr-dev mailing list