{"action":"created","issue":{"url":"https://api.github.com/repos/madebyhiro/codem-transcode/issues/45","labels_url":"https://api.github.com/repos/madebyhiro/codem-transcode/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/madebyhiro/codem-transcode/issues/45/comments","events_url":"https://api.github.com/repos/madebyhiro/codem-transcode/issues/45/events","html_url":"https://github.com/madebyhiro/codem-transcode/issues/45","id":89569169,"number":45,"title":"Init script with codem-transcode and CentOS 7 not working","user":{"login":"ProvostA","id":12957296,"avatar_url":"https://avatars.githubusercontent.com/u/12957296?v=3","gravatar_id":"","url":"https://api.github.com/users/ProvostA","html_url":"https://github.com/ProvostA","followers_url":"https://api.github.com/users/ProvostA/followers","following_url":"https://api.github.com/users/ProvostA/following{/other_user}","gists_url":"https://api.github.com/users/ProvostA/gists{/gist_id}","starred_url":"https://api.github.com/users/ProvostA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ProvostA/subscriptions","organizations_url":"https://api.github.com/users/ProvostA/orgs","repos_url":"https://api.github.com/users/ProvostA/repos","events_url":"https://api.github.com/users/ProvostA/events{/privacy}","received_events_url":"https://api.github.com/users/ProvostA/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-19T13:50:15Z","updated_at":"2015-06-29T06:43:09Z","closed_at":null,"body":"I installed codem-transcode on CentOS - 7 and the script \" init.d \" no longer works with this version of the system.\r\n\r\nIf i try to run this command: \r\n\r\nrunuser -l codem -c \"/home/codem/node_modules/codem-transcode/bin/codem-transcode -c /home/codem/node_modules/codem-transcode/config/server-IP_3000.json\"\r\n\r\n\r\nIt is working fine\r\n\r\nHere is the script:\r\n\r\n#!/bin/sh\r\n\r\n# chkconfig: 35 99 99\r\n# description: Node.js /home/codem/node_modules/codem-transcode/bin\r\n#\r\n\r\n\r\n. /etc/rc.d/init.d/functions\r\n\r\nUSER=\"codem\"\r\n\r\nDAEMON=\"/home/codem/node_modules/codem-transcode/bin/codem-transcode\"\r\nROOT_DIR=\"/home/codem/node_modules/codem-transcode/bin\"\r\n\r\nSERVER=\"$ROOT_DIR/codem-transcode\"\r\nLOG_FILE=\"/var/log/codem-transcode/codem-transcode.log\"\r\n\r\nLOCK_FILE=\"/var/lock/subsys/codem-transcode\"\r\n\r\ndo_start()\r\n{\r\n        if [ ! -f \"$LOCK_FILE\" ] ; then\r\n                echo -n $\"Starting $SERVER: \"\r\n                runuser -l \"$USER\" -c \"$DAEMON $SERVER -c /home/codem/node_modules/codem-transcode/config/server-IP_3000.json\r\n>> LOG_FILE  &\" && echo_success || echo_failure\r\n                RETVAL=$?\r\n                echo\r\n                [ $RETVAL -eq 0 ] && touch $LOCK_FILE\r\n        else\r\n                echo \"$SERVER is locked.\"\r\n                RETVAL=1\r\n        fi\r\n}\r\ndo_stop()\r\n{\r\n        echo -n $\"Stopping $SERVER: \"\r\n        pid=`ps -aefw | grep \"$DAEMON $SERVER\" | grep -v \" grep \" | awk '{print $2}'`\r\n        kill -9 $pid > /dev/null 2>&1 && echo_success || echo_failure\r\n        RETVAL=$?\r\n        echo\r\n        [ $RETVAL -eq 0 ] && rm -f $LOCK_FILE\r\n}\r\n\r\ncase \"$1\" in\r\n        start)\r\n                do_start\r\n                ;;\r\n        stop)\r\n                ;;\r\n        restart)\r\n                do_stop\r\n                do_start\r\n                ;;\r\n        *)\r\n                echo \"Usage: $0 {start|stop|restart}\"\r\n                RETVAL=1\r\nesac\r\n\r\nexit $RETVAL"},"comment":{"url":"https://api.github.com/repos/madebyhiro/codem-transcode/issues/comments/116480759","html_url":"https://github.com/madebyhiro/codem-transcode/issues/45#issuecomment-116480759","issue_url":"https://api.github.com/repos/madebyhiro/codem-transcode/issues/45","id":116480759,"user":{"login":"tieleman","id":28905,"avatar_url":"https://avatars.githubusercontent.com/u/28905?v=3","gravatar_id":"","url":"https://api.github.com/users/tieleman","html_url":"https://github.com/tieleman","followers_url":"https://api.github.com/users/tieleman/followers","following_url":"https://api.github.com/users/tieleman/following{/other_user}","gists_url":"https://api.github.com/users/tieleman/gists{/gist_id}","starred_url":"https://api.github.com/users/tieleman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tieleman/subscriptions","organizations_url":"https://api.github.com/users/tieleman/orgs","repos_url":"https://api.github.com/users/tieleman/repos","events_url":"https://api.github.com/users/tieleman/events{/privacy}","received_events_url":"https://api.github.com/users/tieleman/received_events","type":"User","site_admin":false},"created_at":"2015-06-29T06:43:09Z","updated_at":"2015-06-29T06:43:09Z","body":"Thanks, @bartzon, maybe it's time to update the Codem packages with the latest software versions and latest OS releases?"}}