From 16cd06e330c75c48852954a3925a46386bf709fa Mon Sep 17 00:00:00 2001 From: Emanuel Russo Date: Tue, 12 Feb 2019 10:34:42 +0100 Subject: [PATCH 1/2] Modify Check Root Startup --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 68c65b7..b839694 100644 --- a/main.go +++ b/main.go @@ -60,8 +60,8 @@ var httpSessions = make(map[string]*HttpSession) func main() { cfg := parseConfig() - if !checkUser() { - log.Println("Operation not permitted") + if (!checkUser() && cfg.username == "" && cfg.password =="") { + log.Println("Operation not permitted. Please start as root or define Username and Password in configuration file") os.Exit(1) } From b989de691b51a728f65c1aefe3fcd9a6a85bec3e Mon Sep 17 00:00:00 2001 From: Emanuel Russo Date: Tue, 12 Feb 2019 10:37:49 +0100 Subject: [PATCH 2/2] Update Readme Modify startup command --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ab7aa64..a62cf7c 100644 --- a/README.md +++ b/README.md @@ -35,9 +35,13 @@ The server side of [rtty](https://github.com/zhaojh329/rtty) -ssl-key string keyFile Path -## run +## run as root (use system credentials) sudo ./rttys + +## run as normal user (define username and password in config file) + + ./rttys # Contributing If you would like to help making [rttys](https://github.com/zhaojh329/rttys) better,