Merge pull request #13 from emanuelr93/master

Root Startup fix
This commit is contained in:
Jianhui Zhao
2019-02-12 18:50:41 +08:00
committed by GitHub
2 changed files with 7 additions and 3 deletions
+5 -1
View File
@@ -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,
+2 -2
View File
@@ -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)
}