<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>If you change User= and Group= in the service file to root, you might not
see such a message. To run as user opensips, then user opensips must exist on
the system; in addition, ownership on files/folders that will be accessed by
Opensips needs to be changed.</DIV>
<DIV>
<DIV
style="FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: inline"></DIV>
<DIV style="FONT: 10pt tahoma">
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=nabeelshikder@gmail.com
href="mailto:nabeelshikder@gmail.com">Nabeel</A> </DIV>
<DIV><B>Sent:</B> Tuesday, September 15, 2015 9:47 PM</DIV>
<DIV><B>To:</B> <A title=users@lists.opensips.org
href="mailto:users@lists.opensips.org">OpenSIPS users mailling list</A> </DIV>
<DIV><B>Subject:</B> Re: [OpenSIPS-Users] Restart=always and
After=mysql.service</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: inline">
<DIV dir=ltr><FONT face="arial, helvetica, sans-serif">I tried that service file
on CentOS 7 but got the following error when trying to start the service:</FONT>
<DIV><FONT face="arial, helvetica, sans-serif"><BR></FONT></DIV>
<DIV>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><FONT
face="arial, helvetica, sans-serif">Failed at step EXEC spawning
/usr/sbin/opensips: Permission denied</FONT></BLOCKQUOTE>
<DIV><FONT face="arial, helvetica, sans-serif"><BR></FONT></DIV>
<DIV><FONT face="arial, helvetica, sans-serif">Changing permissions of that
directory did not solve the problem:</FONT></DIV>
<DIV><FONT face="arial, helvetica, sans-serif"><BR></FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: rgb(255,255,255)" color=#000000
face="arial, helvetica, sans-serif"><SPAN
style="BORDER-TOP: 0px; BORDER-RIGHT: 0px; BORDER-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 0px; MARGIN: 0px; BORDER-LEFT: 0px; PADDING-RIGHT: 0px">chmod
</SPAN><SPAN
style="BORDER-TOP: 0px; BORDER-RIGHT: 0px; BORDER-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 0px; MARGIN: 0px; BORDER-LEFT: 0px; PADDING-RIGHT: 0px">+</SPAN><SPAN
style="BORDER-TOP: 0px; BORDER-RIGHT: 0px; BORDER-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 0px; MARGIN: 0px; BORDER-LEFT: 0px; PADDING-RIGHT: 0px">x
/usr/sbin/opensips</SPAN></FONT></DIV>
<DIV><FONT face="arial, helvetica, sans-serif"><BR></FONT></DIV>
<DIV><FONT face="arial, helvetica, sans-serif">chmod -R 777 /usr/sbin/opensips
</FONT></DIV></DIV>
<DIV><FONT face="arial, helvetica, sans-serif"><BR></FONT></DIV>
<DIV><FONT face="arial, helvetica, sans-serif">Does the service file need
modification for CentOS?</FONT></DIV>
<DIV><FONT face="arial, helvetica, sans-serif"><BR></FONT></DIV>
<DIV class=gmail_extra><FONT face="arial, helvetica, sans-serif"><BR></FONT>
<DIV class=gmail_quote><FONT face="arial, helvetica, sans-serif">On 7 September
2015 at 19:14, Nabeel <SPAN dir=ltr><<A href="mailto:nabeelshikder@gmail.com"
target=_blank>nabeelshikder@gmail.com</A>></SPAN> wrote:<BR></FONT>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV dir=ltr><FONT face="arial, helvetica, sans-serif">Hi,</FONT>
<DIV><FONT face="arial, helvetica, sans-serif"><BR></FONT></DIV>
<DIV><FONT face="arial, helvetica, sans-serif">Most of my services have a
.service file located at /usr/lib/systemd/system where I can set
'Restart=always' or 'After=mysql.service' / 'After=mariadb.service' to make
sure the server starts at the appropriate times.</FONT></DIV>
<DIV><FONT face="arial, helvetica, sans-serif"><BR></FONT></DIV>
<DIV><FONT face="arial, helvetica, sans-serif">However, there is no such
.service file for OpenSIPS. Please advise how to create this .service
file for OpenSIPS. I heard about 'respawn' but don't know how exactly to
use this and would prefer to use a .service file like other
services.</FONT></DIV></DIV></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV></DIV>
<P>
<HR>
_______________________________________________<BR>Users mailing
list<BR>Users@lists.opensips.org<BR>http://lists.opensips.org/cgi-bin/mailman/listinfo/users<BR></DIV></DIV></DIV></BODY></HTML>