)]}'
{"functions-common":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"98f3dbb57e6e0c7e6f2824d4a1a4816f61cea215","unresolved":false,"context_lines":[{"line_number":2265,"context_line":"function restart_service {"},{"line_number":2266,"context_line":"    if is_ubuntu; then"},{"line_number":2267,"context_line":"       if [ -x /bin/systemctl ]; then"},{"line_number":2268,"context_line":"          sudo systemctl $1 restart"},{"line_number":2269,"context_line":"       else"},{"line_number":2270,"context_line":"          sudo /usr/sbin/service $1 restart"},{"line_number":2271,"context_line":"    else"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"bab6814e_cf7024df","line":2268,"updated":"2016-05-20 11:40:43.000000000","message":"Need to switch \"$1\" and \"restart\", same below.","commit_id":"c6e47fa9dc2a7a6110b1ab0e432241e18440e5d4"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"868565b8d611b44d2cf1e082faf0076a1a5ced26","unresolved":false,"context_lines":[{"line_number":2265,"context_line":"function restart_service {"},{"line_number":2266,"context_line":"    if is_ubuntu; then"},{"line_number":2267,"context_line":"       if [ -x /bin/systemctl ]; then"},{"line_number":2268,"context_line":"          sudo systemctl $1 restart"},{"line_number":2269,"context_line":"       else"},{"line_number":2270,"context_line":"          sudo /usr/sbin/service $1 restart"},{"line_number":2271,"context_line":"    else"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"bab6814e_52e33733","line":2268,"in_reply_to":"bab6814e_cf7024df","updated":"2016-05-20 11:46:37.000000000","message":"Duh. Fixing it in the next iteration...","commit_id":"c6e47fa9dc2a7a6110b1ab0e432241e18440e5d4"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"2a700c715d2657bd9d2acb0e992d683a36cc30e9","unresolved":false,"context_lines":[{"line_number":2267,"context_line":"       if [ -x /bin/systemctl ]; then"},{"line_number":2268,"context_line":"          sudo systemctl restart $1"},{"line_number":2269,"context_line":"       else"},{"line_number":2270,"context_line":"          sudo /usr/sbin/service restart $1"},{"line_number":2271,"context_line":"       fi"},{"line_number":2272,"context_line":"    else"},{"line_number":2273,"context_line":"        sudo /sbin/service restart $1"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bab6814e_a2320ef0","line":2270,"updated":"2016-05-20 13:56:59.000000000","message":"why is this parameter order changed?","commit_id":"ab620b778dc05b2353ddc6762253eda1945b6610"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"e56f9606aff015edfaeb8833d37e2b4b647bc515","unresolved":false,"context_lines":[{"line_number":2267,"context_line":"       if [ -x /bin/systemctl ]; then"},{"line_number":2268,"context_line":"          sudo systemctl restart $1"},{"line_number":2269,"context_line":"       else"},{"line_number":2270,"context_line":"          sudo /usr/sbin/service restart $1"},{"line_number":2271,"context_line":"       fi"},{"line_number":2272,"context_line":"    else"},{"line_number":2273,"context_line":"        sudo /sbin/service restart $1"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bab6814e_e25ff6e2","line":2270,"in_reply_to":"bab6814e_a2320ef0","updated":"2016-05-20 13:59:40.000000000","message":"Sigh, thoughtless search / replace.  Fix upcoming (for others below too).  Thanks for catching.","commit_id":"ab620b778dc05b2353ddc6762253eda1945b6610"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"572717e794fd4ca530f9ec53171e5975a13b9e89","unresolved":false,"context_lines":[{"line_number":2265,"context_line":"function restart_service {"},{"line_number":2266,"context_line":"    if is_ubuntu; then"},{"line_number":2267,"context_line":"        if [ -x /bin/systemctl ]; then"},{"line_number":2268,"context_line":"            sudo systemctl restart $1"},{"line_number":2269,"context_line":"        else"},{"line_number":2270,"context_line":"            sudo /usr/sbin/service $1 restart"},{"line_number":2271,"context_line":"        fi"}],"source_content_type":"application/x-shellscript","patch_set":5,"id":"bab6814e_ed37de4a","line":2268,"updated":"2016-05-20 18:00:32.000000000","message":"/bin/systemctl\n\nbelow too","commit_id":"9bb2d123bcc006a86469c82275bba72f02d0ee80"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"17d122692c394d9b7b2061bcb21bd908ae6d9666","unresolved":false,"context_lines":[{"line_number":2266,"context_line":"    if [ -x /bin/systemctl ]; then"},{"line_number":2267,"context_line":"        sudo /bin/systemctl restart $1"},{"line_number":2268,"context_line":"    else"},{"line_number":2269,"context_line":"        sudo /usr/bin/env service $1 restart"},{"line_number":2270,"context_line":"    fi"},{"line_number":2271,"context_line":""},{"line_number":2272,"context_line":"}"}],"source_content_type":"application/x-shellscript","patch_set":6,"id":"bab6814e_e8a95725","line":2269,"range":{"start_line":2269,"start_character":13,"end_line":2269,"end_character":25},"updated":"2016-05-23 11:48:18.000000000","message":"I\u0027m not sure why we\u0027d use /usr/bin/env at all here. Because we\u0027ve fallen back to path, and env isn\u0027t going to change anything.","commit_id":"7b1bcb6f713962660b838e4fdf81abbd564d24af"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"c39bffc1ac549e04fb2399a38296aac3c197933c","unresolved":false,"context_lines":[{"line_number":2266,"context_line":"    if [ -x /bin/systemctl ]; then"},{"line_number":2267,"context_line":"        sudo /bin/systemctl restart $1"},{"line_number":2268,"context_line":"    else"},{"line_number":2269,"context_line":"        sudo /usr/bin/env service $1 restart"},{"line_number":2270,"context_line":"    fi"},{"line_number":2271,"context_line":""},{"line_number":2272,"context_line":"}"}],"source_content_type":"application/x-shellscript","patch_set":6,"id":"bab6814e_c58f1173","line":2269,"range":{"start_line":2269,"start_character":13,"end_line":2269,"end_character":25},"in_reply_to":"bab6814e_e8a95725","updated":"2016-05-23 14:29:26.000000000","message":"Sigh...I think you\u0027re referring to this, from here[*]:\n\n    # Not all distros have sbin in PATH for regular users.\n    PATH\u003d$PATH:/usr/local/sbin:/usr/sbin:/sbin\n\n[*] http://git.openstack.org/cgit/openstack-dev/devstack/tree/stack.sh#n33\n\nSo, get back to the previous \u0027is_ubuntu\u0027 check?\n\nWith that check, at least for distributions like Fedora, `service` will use `systemctl` automatically when present.","commit_id":"7b1bcb6f713962660b838e4fdf81abbd564d24af"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"55190dc7749d4741c502f407226ebdee500bf640","unresolved":false,"context_lines":[{"line_number":2264,"context_line":"# Service wrapper to restart services"},{"line_number":2265,"context_line":"# restart_service service-name"},{"line_number":2266,"context_line":"function restart_service {"},{"line_number":2267,"context_line":"    if SYSTEMCTL_EXISTS; then"},{"line_number":2268,"context_line":"        sudo systemctl restart $1"},{"line_number":2269,"context_line":"    else"},{"line_number":2270,"context_line":"        sudo service $1 restart"}],"source_content_type":"application/x-shellscript","patch_set":9,"id":"bab6814e_49e142fe","line":2267,"updated":"2016-05-24 13:23:57.000000000","message":"[[ $SYSTEMCTL_EXISTS \u003d True ]]","commit_id":"ddaa0e208df03325318d5f6fbd35e73e28ea9a2d"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"21506c38451dd6259df527c739038654127dc087","unresolved":false,"context_lines":[{"line_number":2264,"context_line":"# Service wrapper to restart services"},{"line_number":2265,"context_line":"# restart_service service-name"},{"line_number":2266,"context_line":"function restart_service {"},{"line_number":2267,"context_line":"    if [[ $SYSTEMCTL_EXISTS \u003d True]]; then"},{"line_number":2268,"context_line":"        sudo systemctl restart $1"},{"line_number":2269,"context_line":"    else"},{"line_number":2270,"context_line":"        sudo service $1 restart"}],"source_content_type":"application/x-shellscript","patch_set":10,"id":"bab6814e_47fe4906","line":2267,"range":{"start_line":2267,"start_character":7,"end_line":2267,"end_character":37},"updated":"2016-05-24 13:49:02.000000000","message":"nit: Could be a function:\n\n    function has_systemctl {\n        if [[ $SYSTEMCTL_EXISTS \u003d True ]]; then\n            return 0\n        else\n            return 1\n        fi\n    }\n\nWe can then use it as:\n\n    if has_systemctl; then\n        echo \"systemctl exists\"\n    else\n        echo \"no systemctl\"\n    fi","commit_id":"585daf9e59e6b8388738886fa85a778695221f25"}]}
