{"action":"created","issue":{"url":"https://api.github.com/repos/jenkinsci/packaging/issues/93","repository_url":"https://api.github.com/repos/jenkinsci/packaging","labels_url":"https://api.github.com/repos/jenkinsci/packaging/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/packaging/issues/93/comments","events_url":"https://api.github.com/repos/jenkinsci/packaging/issues/93/events","html_url":"https://github.com/jenkinsci/packaging/pull/93","id":218898599,"number":93,"title":"Add jenkins.service for systemd which is in use in debian","user":{"login":"paladox","id":5727000,"avatar_url":"https://avatars0.githubusercontent.com/u/5727000?v=3","gravatar_id":"","url":"https://api.github.com/users/paladox","html_url":"https://github.com/paladox","followers_url":"https://api.github.com/users/paladox/followers","following_url":"https://api.github.com/users/paladox/following{/other_user}","gists_url":"https://api.github.com/users/paladox/gists{/gist_id}","starred_url":"https://api.github.com/users/paladox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paladox/subscriptions","organizations_url":"https://api.github.com/users/paladox/orgs","repos_url":"https://api.github.com/users/paladox/repos","events_url":"https://api.github.com/users/paladox/events{/privacy}","received_events_url":"https://api.github.com/users/paladox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-04-03T11:02:20Z","updated_at":"2017-04-14T11:10:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jenkinsci/packaging/pulls/93","html_url":"https://github.com/jenkinsci/packaging/pull/93","diff_url":"https://github.com/jenkinsci/packaging/pull/93.diff","patch_url":"https://github.com/jenkinsci/packaging/pull/93.patch"},"body":"This file is from @hashar @wikimedia See https://github.com/wikimedia/puppet/commit/07c8bb1ab32d9c4570ae2cb80761f2ce8d64302f"},"comment":{"url":"https://api.github.com/repos/jenkinsci/packaging/issues/comments/294137141","html_url":"https://github.com/jenkinsci/packaging/pull/93#issuecomment-294137141","issue_url":"https://api.github.com/repos/jenkinsci/packaging/issues/93","id":294137141,"user":{"login":"fuero","id":108815,"avatar_url":"https://avatars1.githubusercontent.com/u/108815?v=3","gravatar_id":"","url":"https://api.github.com/users/fuero","html_url":"https://github.com/fuero","followers_url":"https://api.github.com/users/fuero/followers","following_url":"https://api.github.com/users/fuero/following{/other_user}","gists_url":"https://api.github.com/users/fuero/gists{/gist_id}","starred_url":"https://api.github.com/users/fuero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fuero/subscriptions","organizations_url":"https://api.github.com/users/fuero/orgs","repos_url":"https://api.github.com/users/fuero/repos","events_url":"https://api.github.com/users/fuero/events{/privacy}","received_events_url":"https://api.github.com/users/fuero/received_events","type":"User","site_admin":false},"created_at":"2017-04-14T11:10:49Z","updated_at":"2017-04-14T11:10:49Z","body":"I'm using this on CentOS 7. Running the SysV script incorrectly assigns the SELinux label initrc_t instead of unconfined_service_t. This is fixed by using a systemd initscript.\r\n\r\njenkins.service\r\n```\r\n[Unit]\r\nDescription=Jenkins build server\r\n\r\n[Service]\r\nType=forking\r\nUser=jenkins\r\nGroup=jenkins\r\nEnvironmentFile=-/etc/sysconfig/jenkins\r\nExecStart=/usr/local/bin/jenkins\r\n\r\n[Install]\r\nWantedBy=multi-user.target\r\n```\r\n\r\n/usr/local/bin/jenkins\r\n```\r\n#!/bin/sh\r\n# Check for missing binaries (stale symlinks should not happen)                                                                                                                                                                                                                                                       \r\nJENKINS_WAR=\"/usr/lib/jenkins/jenkins.war\"\r\ntest -r \"$JENKINS_WAR\" || { echo \"$JENKINS_WAR not installed\";\r\n        if [ \"$1\" = \"stop\" ]; then exit 0;\r\n        else exit 5; fi; }\r\n\r\n# Set up environment accordingly to the configuration settings\r\n[ -n \"$JENKINS_HOME\" ] || { echo \"JENKINS_HOME not configured\";\r\n        if [ \"$1\" = \"stop\" ]; then exit 0;\r\n        else exit 6; fi; }\r\n[ -d \"$JENKINS_HOME\" ] || { echo \"JENKINS_HOME directory does not exist: $JENKINS_HOME\";\r\n        if [ \"$1\" = \"stop\" ]; then exit 0;\r\n        else exit 1; fi; }\r\n\r\n# Search usable Java as /usr/bin/java might not point to minimal version required by Jenkins.\r\n# see http://www.nabble.com/guinea-pigs-wanted-----Hudson-RPM-for-RedHat-Linux-td25673707.html\r\ncandidates=\"\r\n/etc/alternatives/java\r\n/usr/lib/jvm/java-1.8.0/bin/java\r\n/usr/lib/jvm/jre-1.8.0/bin/java\r\n/usr/lib/jvm/java-1.7.0/bin/java\r\n/usr/lib/jvm/jre-1.7.0/bin/java\r\n/usr/bin/java\r\n\"\r\nfor candidate in $candidates\r\ndo\r\n  [ -x \"$JENKINS_JAVA_CMD\" ] && break\r\n  JENKINS_JAVA_CMD=\"$candidate\"\r\ndone\r\n\r\nJAVA_CMD=\"$JENKINS_JAVA_CMD $JENKINS_JAVA_OPTIONS -DJENKINS_HOME=$JENKINS_HOME -jar $JENKINS_WAR\"\r\nPARAMS=\"--logfile=/var/log/jenkins/jenkins.log --webroot=/var/cache/jenkins/war --daemon\"\r\n[ -n \"$JENKINS_PORT\" ] && PARAMS=\"$PARAMS --httpPort=$JENKINS_PORT\"\r\n[ -n \"$JENKINS_LISTEN_ADDRESS\" ] && PARAMS=\"$PARAMS --httpListenAddress=$JENKINS_LISTEN_ADDRESS\"\r\n[ -n \"$JENKINS_HTTPS_PORT\" ] && PARAMS=\"$PARAMS --httpsPort=$JENKINS_HTTPS_PORT\"\r\n[ -n \"$JENKINS_HTTPS_KEYSTORE\" ] && PARAMS=\"$PARAMS --httpsKeyStore=$JENKINS_HTTPS_KEYSTORE\"\r\n[ -n \"$JENKINS_HTTPS_KEYSTORE_PASSWORD\" ] && PARAMS=\"$PARAMS --httpsKeyStorePassword='$JENKINS_HTTPS_KEYSTORE_PASSWORD'\"\r\n[ -n \"$JENKINS_HTTPS_LISTEN_ADDRESS\" ] && PARAMS=\"$PARAMS --httpsListenAddress=$JENKINS_HTTPS_LISTEN_ADDRESS\"\r\n[ -n \"$JENKINS_DEBUG_LEVEL\" ] && PARAMS=\"$PARAMS --debug=$JENKINS_DEBUG_LEVEL\"\r\n[ -n \"$JENKINS_HANDLER_STARTUP\" ] && PARAMS=\"$PARAMS --handlerCountStartup=$JENKINS_HANDLER_STARTUP\"\r\n[ -n \"$JENKINS_HANDLER_MAX\" ] && PARAMS=\"$PARAMS --handlerCountMax=$JENKINS_HANDLER_MAX\"\r\n[ -n \"$JENKINS_HANDLER_IDLE\" ] && PARAMS=\"$PARAMS --handlerCountMaxIdle=$JENKINS_HANDLER_IDLE\"\r\n[ -n \"$JENKINS_ARGS\" ] && PARAMS=\"$PARAMS $JENKINS_ARGS\"\r\n\r\nif [ \"$JENKINS_ENABLE_ACCESS_LOG\" = \"yes\" ]; then\r\n    PARAMS=\"$PARAMS --accessLoggerClassName=winstone.accesslog.SimpleAccessLogger --simpleAccessLogger.format=combined --simpleAccessLogger.file=/var/log/jenkins/access_log\"\r\nfi\r\n\r\nexec $JAVA_CMD $PARAMS\r\n```"}}
{"actor":{"display_login":"fuero"}}