{"action":"created","issue":{"url":"https://api.github.com/repos/kamailio/kamailio/issues/294","labels_url":"https://api.github.com/repos/kamailio/kamailio/issues/294/labels{/name}","comments_url":"https://api.github.com/repos/kamailio/kamailio/issues/294/comments","events_url":"https://api.github.com/repos/kamailio/kamailio/issues/294/events","html_url":"https://github.com/kamailio/kamailio/issues/294","id":102137659,"number":294,"title":"add systemd support to deb packages","user":{"login":"zabbal","id":471821,"avatar_url":"https://avatars.githubusercontent.com/u/471821?v=3","gravatar_id":"","url":"https://api.github.com/users/zabbal","html_url":"https://github.com/zabbal","followers_url":"https://api.github.com/users/zabbal/followers","following_url":"https://api.github.com/users/zabbal/following{/other_user}","gists_url":"https://api.github.com/users/zabbal/gists{/gist_id}","starred_url":"https://api.github.com/users/zabbal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zabbal/subscriptions","organizations_url":"https://api.github.com/users/zabbal/orgs","repos_url":"https://api.github.com/users/zabbal/repos","events_url":"https://api.github.com/users/zabbal/events{/privacy}","received_events_url":"https://api.github.com/users/zabbal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"linuxmaniac","id":63080,"avatar_url":"https://avatars.githubusercontent.com/u/63080?v=3","gravatar_id":"","url":"https://api.github.com/users/linuxmaniac","html_url":"https://github.com/linuxmaniac","followers_url":"https://api.github.com/users/linuxmaniac/followers","following_url":"https://api.github.com/users/linuxmaniac/following{/other_user}","gists_url":"https://api.github.com/users/linuxmaniac/gists{/gist_id}","starred_url":"https://api.github.com/users/linuxmaniac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linuxmaniac/subscriptions","organizations_url":"https://api.github.com/users/linuxmaniac/orgs","repos_url":"https://api.github.com/users/linuxmaniac/repos","events_url":"https://api.github.com/users/linuxmaniac/events{/privacy}","received_events_url":"https://api.github.com/users/linuxmaniac/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-08-20T13:23:52Z","updated_at":"2015-09-08T14:52:27Z","closed_at":null,"body":"Right now kamailio.service is available in pkg/kamailio/fedora/17 but not in pkg/kamailio/deb.\r\nWith both Ubuntu and Debian switched to systemd it would make sense to unify packaging and use .service for deb packages as well.\r\n\r\nIn addition to give users chance to better test this before next LTS release it might make sense to add builds for ubuntu 15.04 too."},"comment":{"url":"https://api.github.com/repos/kamailio/kamailio/issues/comments/138590939","html_url":"https://github.com/kamailio/kamailio/issues/294#issuecomment-138590939","issue_url":"https://api.github.com/repos/kamailio/kamailio/issues/294","id":138590939,"user":{"login":"giavac","id":3305097,"avatar_url":"https://avatars.githubusercontent.com/u/3305097?v=3","gravatar_id":"","url":"https://api.github.com/users/giavac","html_url":"https://github.com/giavac","followers_url":"https://api.github.com/users/giavac/followers","following_url":"https://api.github.com/users/giavac/following{/other_user}","gists_url":"https://api.github.com/users/giavac/gists{/gist_id}","starred_url":"https://api.github.com/users/giavac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giavac/subscriptions","organizations_url":"https://api.github.com/users/giavac/orgs","repos_url":"https://api.github.com/users/giavac/repos","events_url":"https://api.github.com/users/giavac/events{/privacy}","received_events_url":"https://api.github.com/users/giavac/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T14:52:27Z","updated_at":"2015-09-08T14:52:27Z","body":"I've spent some time on a debian jessie host, adapting a systemd script I've been using (please see below).\r\n\r\nSome notes:\r\n- As you probably know, sh_installinit already takes care of installing a .service file found in the debian folder, so it's sufficient to remove the kamailio.init and add the kamailio.service file.\r\n- After dh_installinit, you should add dh_systemd_enable and dh_systemd_start (both provided by 'dh-systemd' package)\r\n- The script has some default values, but those variables can be overwritten by the variables in /etc/default/kamailio (I made this in order not to deviate too much in respect to the current approach of the init.d script).\r\n\r\nI hope this helps, and I'm available for any question or to perform specific tests.\r\n\r\n```\r\n[Unit]\r\nDescription=Kamailio (OpenSER) - the Open Source SIP Server\r\nAfter=syslog.target network.target\r\n\r\n[Service]\r\nType=forking\r\nEnvironment='PIDFILE=/var/run/kamailio/kamailio.pid'\r\nEnvironment='CFGFILE=/etc/kamailio/kamailio.cfg'\r\nEnvironment='SHM_MEMORY=64'\r\nEnvironment='PKG_MEMORY=8'\r\nEnvironment='USER=kamailio'\r\nEnvironment='GROUP=kamailio'\r\nEnvironment='DAEMON=/usr/sbin/kamailio'\r\nEnvironmentFile=/etc/default/kamailio\r\nPIDFile=$PIDFILE\r\n# ExecStart requires a full absolute path\r\nExecStart=/usr/sbin/kamailio -P $PIDFILE -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP\r\nExecStopPost=/bin/rm -f $PIDFILE\r\nRestart=on-abort\r\n\r\n[Install]\r\nWantedBy=multi-user.target\r\n```\r\n"}}