{"action":"created","comment":{"url":"https://api.github.com/repos/scorelab/Bassa/pulls/comments/172048806","pull_request_review_id":101005813,"id":172048806,"diff_hunk":"@@ -0,0 +1,125 @@\n+#!/bin/bash\n+: '\n+# python3 Main.py\n+# gulp serve\n+# arie2c --enable-rpc\n+'\n+start(){\n+\t# first check the current status of the server using log file exsitance\n+\tcheck_status=$( status )\n+\tif [ \"$check_status\" == \"inactive\" ]\n+\tthen\n+\t\techo -ne '\\e[32mstarting...'\n+\t\t# this one is just to look good \n+\t\tfor number in {1..6}\n+\t\tdo\n+\t\t\techo -ne '.'\n+\t\t\tsleep .5\n+\t\tdone\n+\t\t# get the base directory of the bassa server files\n+\n+\t\tBASEDIR=$(dirname \"$0\")\n+\t\tPYSERVER=\"$BASEDIR/components/core/Main.py\"\n+\t\tUISERVER=\"$BASEDIR/ui\"\n+\n+\t\t# this one is to use the temporary folder for extra data\n+\n+\t\tif [ ! -d \"/tmp/bassa\" ]; then\n+\t\t\tmkdir /tmp/bassa\n+\t\tfi\n+\n+\t\t# making log file for server\n+\n+\t\tif [ ! -f \"$BASEDIR\"\"/python-server.log\" ]; then\n+\t\t\techo \"\" > \"$BASEDIR\"\"/python-server.log\"\n+\t\t\techo \"\" > \"$UISERVER\"\"/gulp-serve.log\"\n+\t\t\techo \"\" > \"$UISERVER\"\"/aria2c.log\"\n+\t\tfi\n+\t\t\n+\t\t# making process in backgroud using nohup\n+\n+\t\tnohup python3 \"$PYSERVER\" &>> \"$BASEDIR\"\"/python-server.log\" &\n+\t\tcd \"$UISERVER\"\n+\t\tnohup gulp serve &>> \"$UISERVER\"\"/gulp-serve.log\" &\n+\t\tnohup aria2c --enable-rpc &>> \"$UISERVER\"\"/aria2c.log\" &\n+\t\techo -e 'started successfully\\e[0m'\n+\telse\n+\t\techo -e \"\\e[32mServer is running successfully\\e[0m\"\n+\tfi\n+}\n+stop(){\n+\techo -ne '\\e[31mstoping.'","path":"bassa","position":51,"original_position":51,"commit_id":"7357ac6229436c15a0422859e74a4a9b4dd49f1c","original_commit_id":"7357ac6229436c15a0422859e74a4a9b4dd49f1c","user":{"login":"malithsen","id":6216000,"avatar_url":"https://avatars1.githubusercontent.com/u/6216000?v=4","gravatar_id":"","url":"https://api.github.com/users/malithsen","html_url":"https://github.com/malithsen","followers_url":"https://api.github.com/users/malithsen/followers","following_url":"https://api.github.com/users/malithsen/following{/other_user}","gists_url":"https://api.github.com/users/malithsen/gists{/gist_id}","starred_url":"https://api.github.com/users/malithsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malithsen/subscriptions","organizations_url":"https://api.github.com/users/malithsen/orgs","repos_url":"https://api.github.com/users/malithsen/repos","events_url":"https://api.github.com/users/malithsen/events{/privacy}","received_events_url":"https://api.github.com/users/malithsen/received_events","type":"User","site_admin":false},"body":"a minor typo. Should be stopping or terminating","created_at":"2018-03-04T13:30:38Z","updated_at":"2018-03-04T13:35:42Z","html_url":"https://github.com/scorelab/Bassa/pull/440#discussion_r172048806","pull_request_url":"https://api.github.com/repos/scorelab/Bassa/pulls/440","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/scorelab/Bassa/pulls/comments/172048806"},"html":{"href":"https://github.com/scorelab/Bassa/pull/440#discussion_r172048806"},"pull_request":{"href":"https://api.github.com/repos/scorelab/Bassa/pulls/440"}}},"pull_request":{"url":"https://api.github.com/repos/scorelab/Bassa/pulls/440","id":171483514,"html_url":"https://github.com/scorelab/Bassa/pull/440","diff_url":"https://github.com/scorelab/Bassa/pull/440.diff","patch_url":"https://github.com/scorelab/Bassa/pull/440.patch","issue_url":"https://api.github.com/repos/scorelab/Bassa/issues/440","number":440,"state":"open","locked":false,"title":"bassa CLI for server maintainer","user":{"login":"vivonk","id":25587962,"avatar_url":"https://avatars2.githubusercontent.com/u/25587962?v=4","gravatar_id":"","url":"https://api.github.com/users/vivonk","html_url":"https://github.com/vivonk","followers_url":"https://api.github.com/users/vivonk/followers","following_url":"https://api.github.com/users/vivonk/following{/other_user}","gists_url":"https://api.github.com/users/vivonk/gists{/gist_id}","starred_url":"https://api.github.com/users/vivonk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vivonk/subscriptions","organizations_url":"https://api.github.com/users/vivonk/orgs","repos_url":"https://api.github.com/users/vivonk/repos","events_url":"https://api.github.com/users/vivonk/events{/privacy}","received_events_url":"https://api.github.com/users/vivonk/received_events","type":"User","site_admin":false},"body":"<!--- Provide a general summary of your changes in the Title above -->\r\nFeature request\r\n## Description\r\nNow the Bassa don't need to start by putting multiple commands in terminal and keep the terminal login\r\nNew feature to use Bassa\r\n```\r\nbassa start | stop | restart | status\r\n```\r\nLogs of the server will go to the following files\r\n```\r\nBassa /\r\n          python-server.log\r\n          ui /\r\n               gulp-serve.log\r\n               aria2c.log\r\n```\r\n\r\n## Related Issue\r\nReproduce #428  and make this feature to happen\r\n<!--- This project only accepts pull requests related to open issues -->\r\n<!--- If suggesting a new feature or change, please discuss it in an issue first -->\r\n<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->\r\n<!--- Please link to the issue here: -->\r\n\r\n## Screenshots (In case of UI changes):\r\n![command screenshot](https://i.imgur.com/qabEvBg.png)\r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] New feature (non-breaking change which adds functionality)\r\n\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] Feature of command start and stop works\r\n- [x] My change requires a change to the documentation, maybe\r\n\r\n## Work left\r\n- checking the errors on start, and show to the maintainer.\r\n- before stopping Bassa, check the download queue and start back after starting the server.\r\n- Making same for Window and testing on Mac OS.","created_at":"2018-02-26T20:31:04Z","updated_at":"2018-03-04T13:35:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"71fba4eae906a443ca9ee4eb1896b68c3856bba4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/scorelab/Bassa/pulls/440/commits","review_comments_url":"https://api.github.com/repos/scorelab/Bassa/pulls/440/comments","review_comment_url":"https://api.github.com/repos/scorelab/Bassa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scorelab/Bassa/issues/440/comments","statuses_url":"https://api.github.com/repos/scorelab/Bassa/statuses/7357ac6229436c15a0422859e74a4a9b4dd49f1c","head":{"label":"vivonk:428-bassa-command-based-tool","ref":"428-bassa-command-based-tool","sha":"7357ac6229436c15a0422859e74a4a9b4dd49f1c","user":{"login":"vivonk","id":25587962,"avatar_url":"https://avatars2.githubusercontent.com/u/25587962?v=4","gravatar_id":"","url":"https://api.github.com/users/vivonk","html_url":"https://github.com/vivonk","followers_url":"https://api.github.com/users/vivonk/followers","following_url":"https://api.github.com/users/vivonk/following{/other_user}","gists_url":"https://api.github.com/users/vivonk/gists{/gist_id}","starred_url":"https://api.github.com/users/vivonk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vivonk/subscriptions","organizations_url":"https://api.github.com/users/vivonk/orgs","repos_url":"https://api.github.com/users/vivonk/repos","events_url":"https://api.github.com/users/vivonk/events{/privacy}","received_events_url":"https://api.github.com/users/vivonk/received_events","type":"User","site_admin":false},"repo":{"id":120356097,"name":"Bassa","full_name":"vivonk/Bassa","owner":{"login":"vivonk","id":25587962,"avatar_url":"https://avatars2.githubusercontent.com/u/25587962?v=4","gravatar_id":"","url":"https://api.github.com/users/vivonk","html_url":"https://github.com/vivonk","followers_url":"https://api.github.com/users/vivonk/followers","following_url":"https://api.github.com/users/vivonk/following{/other_user}","gists_url":"https://api.github.com/users/vivonk/gists{/gist_id}","starred_url":"https://api.github.com/users/vivonk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vivonk/subscriptions","organizations_url":"https://api.github.com/users/vivonk/orgs","repos_url":"https://api.github.com/users/vivonk/repos","events_url":"https://api.github.com/users/vivonk/events{/privacy}","received_events_url":"https://api.github.com/users/vivonk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vivonk/Bassa","description":"Automated Download Queue for Enterprise to take the best use of Internet bandwidth","fork":true,"url":"https://api.github.com/repos/vivonk/Bassa","forks_url":"https://api.github.com/repos/vivonk/Bassa/forks","keys_url":"https://api.github.com/repos/vivonk/Bassa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vivonk/Bassa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vivonk/Bassa/teams","hooks_url":"https://api.github.com/repos/vivonk/Bassa/hooks","issue_events_url":"https://api.github.com/repos/vivonk/Bassa/issues/events{/number}","events_url":"https://api.github.com/repos/vivonk/Bassa/events","assignees_url":"https://api.github.com/repos/vivonk/Bassa/assignees{/user}","branches_url":"https://api.github.com/repos/vivonk/Bassa/branches{/branch}","tags_url":"https://api.github.com/repos/vivonk/Bassa/tags","blobs_url":"https://api.github.com/repos/vivonk/Bassa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vivonk/Bassa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vivonk/Bassa/git/refs{/sha}","trees_url":"https://api.github.com/repos/vivonk/Bassa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vivonk/Bassa/statuses/{sha}","languages_url":"https://api.github.com/repos/vivonk/Bassa/languages","stargazers_url":"https://api.github.com/repos/vivonk/Bassa/stargazers","contributors_url":"https://api.github.com/repos/vivonk/Bassa/contributors","subscribers_url":"https://api.github.com/repos/vivonk/Bassa/subscribers","subscription_url":"https://api.github.com/repos/vivonk/Bassa/subscription","commits_url":"https://api.github.com/repos/vivonk/Bassa/commits{/sha}","git_commits_url":"https://api.github.com/repos/vivonk/Bassa/git/commits{/sha}","comments_url":"https://api.github.com/repos/vivonk/Bassa/comments{/number}","issue_comment_url":"https://api.github.com/repos/vivonk/Bassa/issues/comments{/number}","contents_url":"https://api.github.com/repos/vivonk/Bassa/contents/{+path}","compare_url":"https://api.github.com/repos/vivonk/Bassa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vivonk/Bassa/merges","archive_url":"https://api.github.com/repos/vivonk/Bassa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vivonk/Bassa/downloads","issues_url":"https://api.github.com/repos/vivonk/Bassa/issues{/number}","pulls_url":"https://api.github.com/repos/vivonk/Bassa/pulls{/number}","milestones_url":"https://api.github.com/repos/vivonk/Bassa/milestones{/number}","notifications_url":"https://api.github.com/repos/vivonk/Bassa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vivonk/Bassa/labels{/name}","releases_url":"https://api.github.com/repos/vivonk/Bassa/releases{/id}","deployments_url":"https://api.github.com/repos/vivonk/Bassa/deployments","created_at":"2018-02-05T20:13:25Z","updated_at":"2018-02-05T20:13:27Z","pushed_at":"2018-03-01T20:58:00Z","git_url":"git://github.com/vivonk/Bassa.git","ssh_url":"git@github.com:vivonk/Bassa.git","clone_url":"https://github.com/vivonk/Bassa.git","svn_url":"https://github.com/vivonk/Bassa","homepage":null,"size":1786,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scorelab:master","ref":"master","sha":"40f49ace0cc8c3d9b9ca8bc7e3f86b17a5ce854d","user":{"login":"scorelab","id":5285159,"avatar_url":"https://avatars2.githubusercontent.com/u/5285159?v=4","gravatar_id":"","url":"https://api.github.com/users/scorelab","html_url":"https://github.com/scorelab","followers_url":"https://api.github.com/users/scorelab/followers","following_url":"https://api.github.com/users/scorelab/following{/other_user}","gists_url":"https://api.github.com/users/scorelab/gists{/gist_id}","starred_url":"https://api.github.com/users/scorelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scorelab/subscriptions","organizations_url":"https://api.github.com/users/scorelab/orgs","repos_url":"https://api.github.com/users/scorelab/repos","events_url":"https://api.github.com/users/scorelab/events{/privacy}","received_events_url":"https://api.github.com/users/scorelab/received_events","type":"Organization","site_admin":false},"repo":{"id":35019449,"name":"Bassa","full_name":"scorelab/Bassa","owner":{"login":"scorelab","id":5285159,"avatar_url":"https://avatars2.githubusercontent.com/u/5285159?v=4","gravatar_id":"","url":"https://api.github.com/users/scorelab","html_url":"https://github.com/scorelab","followers_url":"https://api.github.com/users/scorelab/followers","following_url":"https://api.github.com/users/scorelab/following{/other_user}","gists_url":"https://api.github.com/users/scorelab/gists{/gist_id}","starred_url":"https://api.github.com/users/scorelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scorelab/subscriptions","organizations_url":"https://api.github.com/users/scorelab/orgs","repos_url":"https://api.github.com/users/scorelab/repos","events_url":"https://api.github.com/users/scorelab/events{/privacy}","received_events_url":"https://api.github.com/users/scorelab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scorelab/Bassa","description":"Automated Download Queue for Enterprise to take the best use of Internet bandwidth","fork":false,"url":"https://api.github.com/repos/scorelab/Bassa","forks_url":"https://api.github.com/repos/scorelab/Bassa/forks","keys_url":"https://api.github.com/repos/scorelab/Bassa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scorelab/Bassa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scorelab/Bassa/teams","hooks_url":"https://api.github.com/repos/scorelab/Bassa/hooks","issue_events_url":"https://api.github.com/repos/scorelab/Bassa/issues/events{/number}","events_url":"https://api.github.com/repos/scorelab/Bassa/events","assignees_url":"https://api.github.com/repos/scorelab/Bassa/assignees{/user}","branches_url":"https://api.github.com/repos/scorelab/Bassa/branches{/branch}","tags_url":"https://api.github.com/repos/scorelab/Bassa/tags","blobs_url":"https://api.github.com/repos/scorelab/Bassa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scorelab/Bassa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scorelab/Bassa/git/refs{/sha}","trees_url":"https://api.github.com/repos/scorelab/Bassa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scorelab/Bassa/statuses/{sha}","languages_url":"https://api.github.com/repos/scorelab/Bassa/languages","stargazers_url":"https://api.github.com/repos/scorelab/Bassa/stargazers","contributors_url":"https://api.github.com/repos/scorelab/Bassa/contributors","subscribers_url":"https://api.github.com/repos/scorelab/Bassa/subscribers","subscription_url":"https://api.github.com/repos/scorelab/Bassa/subscription","commits_url":"https://api.github.com/repos/scorelab/Bassa/commits{/sha}","git_commits_url":"https://api.github.com/repos/scorelab/Bassa/git/commits{/sha}","comments_url":"https://api.github.com/repos/scorelab/Bassa/comments{/number}","issue_comment_url":"https://api.github.com/repos/scorelab/Bassa/issues/comments{/number}","contents_url":"https://api.github.com/repos/scorelab/Bassa/contents/{+path}","compare_url":"https://api.github.com/repos/scorelab/Bassa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scorelab/Bassa/merges","archive_url":"https://api.github.com/repos/scorelab/Bassa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scorelab/Bassa/downloads","issues_url":"https://api.github.com/repos/scorelab/Bassa/issues{/number}","pulls_url":"https://api.github.com/repos/scorelab/Bassa/pulls{/number}","milestones_url":"https://api.github.com/repos/scorelab/Bassa/milestones{/number}","notifications_url":"https://api.github.com/repos/scorelab/Bassa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scorelab/Bassa/labels{/name}","releases_url":"https://api.github.com/repos/scorelab/Bassa/releases{/id}","deployments_url":"https://api.github.com/repos/scorelab/Bassa/deployments","created_at":"2015-05-04T07:01:33Z","updated_at":"2018-02-06T05:16:17Z","pushed_at":"2018-03-04T13:23:06Z","git_url":"git://github.com/scorelab/Bassa.git","ssh_url":"git@github.com:scorelab/Bassa.git","clone_url":"https://github.com/scorelab/Bassa.git","svn_url":"https://github.com/scorelab/Bassa","homepage":null,"size":1769,"stargazers_count":24,"watchers_count":24,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":296,"mirror_url":null,"archived":false,"open_issues_count":98,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":296,"open_issues":98,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scorelab/Bassa/pulls/440"},"html":{"href":"https://github.com/scorelab/Bassa/pull/440"},"issue":{"href":"https://api.github.com/repos/scorelab/Bassa/issues/440"},"comments":{"href":"https://api.github.com/repos/scorelab/Bassa/issues/440/comments"},"review_comments":{"href":"https://api.github.com/repos/scorelab/Bassa/pulls/440/comments"},"review_comment":{"href":"https://api.github.com/repos/scorelab/Bassa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scorelab/Bassa/pulls/440/commits"},"statuses":{"href":"https://api.github.com/repos/scorelab/Bassa/statuses/7357ac6229436c15a0422859e74a4a9b4dd49f1c"}},"author_association":"NONE"}}
{"actor":{"display_login":"malithsen"}}