{"action":"opened","issue":{"url":"https://api.github.com/repos/monotseng/monotseng/issues/5","repository_url":"https://api.github.com/repos/monotseng/monotseng","labels_url":"https://api.github.com/repos/monotseng/monotseng/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/monotseng/monotseng/issues/5/comments","events_url":"https://api.github.com/repos/monotseng/monotseng/issues/5/events","html_url":"https://github.com/monotseng/monotseng/issues/5","id":331938705,"node_id":"MDU6SXNzdWUzMzE5Mzg3MDU=","number":5,"title":"mysql_mgr","user":{"login":"monotseng","id":6396327,"node_id":"MDQ6VXNlcjYzOTYzMjc=","avatar_url":"https://avatars1.githubusercontent.com/u/6396327?v=4","gravatar_id":"","url":"https://api.github.com/users/monotseng","html_url":"https://github.com/monotseng","followers_url":"https://api.github.com/users/monotseng/followers","following_url":"https://api.github.com/users/monotseng/following{/other_user}","gists_url":"https://api.github.com/users/monotseng/gists{/gist_id}","starred_url":"https://api.github.com/users/monotseng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monotseng/subscriptions","organizations_url":"https://api.github.com/users/monotseng/orgs","repos_url":"https://api.github.com/users/monotseng/repos","events_url":"https://api.github.com/users/monotseng/events{/privacy}","received_events_url":"https://api.github.com/users/monotseng/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-13T10:40:20Z","updated_at":"2018-06-13T10:40:20Z","closed_at":null,"author_association":"OWNER","body":"#!/bin/bash \r\n# description: mysql service control script \r\nMYSQL_START=\"/opt/mysql/mysql/bin/mysqld_safe\"\r\nMYSQL_SHUT=\"/opt/mysql/mysql/bin/mysqladmin\"\r\nCONF=\"/opt/mysql/mysql/conf/$2.cnf\"\r\n\r\ncase $1 in\r\n        start)\r\n        $MYSQL_START --defaults-file=$CONF --user=mysql > /dev/null &\r\n        sleep 3\r\n        \r\n        if [ `ps -ef| grep mysqld | grep $2 | wc -l` -eq 2 ]; then\r\n            echo \"Starting mysql:                 [ Success ^_^ ]\"\r\n        else \r\n            echo \"Starting mysql:                 [ Failed T_T]\"\r\n        fi\r\n        ;;\r\n        stop)\r\n       \r\n        if [ `ps -ef| grep mysqld | grep $2 | wc -l` -eq 2 ]; then\r\n            $MYSQL_SHUT --defaults-file=$CONF -uroot -ppaic1234 shutdown > /dev/null &\r\n            echo \"Shutting down mysql:                    [ Success ^_^ ]\"\r\n        else\r\n            echo \"Shutting down mysql:                    [ mysql isn't running ~_~]\"\r\n        fi\r\n        ;;\r\n        restart)\r\n        $0 stop\r\n        $0 start\r\n        ;;\r\n        *)\r\n        echo \"Usage: $0 {start|stop} {instance_name}\"\r\nesac    "}}
{"actor":{"display_login":"monotseng"}}