mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-20 15:29:28 +01:00
add new config parameters to the setup procedure
This commit is contained in:
parent
8ada2d0b95
commit
ff31d42cca
3
make.sh
3
make.sh
@ -22,7 +22,8 @@ if [ "$1" == "ci_test" ]; then
|
||||
"name": "circle_test"
|
||||
},
|
||||
"session_db": "127.0.0.1:6379",
|
||||
"port": ":8010"
|
||||
"port": ":8010",
|
||||
"email_alert": false
|
||||
}
|
||||
EOF
|
||||
|
||||
|
@ -27,6 +27,7 @@ ${SEMAPHORE_ADMIN}
|
||||
${SEMAPHORE_ADMIN_EMAIL}
|
||||
${SEMAPHORE_ADMIN_NAME}
|
||||
${SEMAPHORE_ADMIN_PASSWORD}
|
||||
n
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
@ -191,4 +191,44 @@ func (conf *configType) Scan() {
|
||||
conf.TmpPath = "/tmp/semaphore"
|
||||
}
|
||||
conf.TmpPath = path.Clean(conf.TmpPath)
|
||||
|
||||
var alertanswer string
|
||||
fmt.Print(" > Do you need an email alerts (y/n, default n): ")
|
||||
fmt.Scanln(&alertanswer)
|
||||
if alertanswer == "yes" || alertanswer == "y" {
|
||||
|
||||
conf.EmailAlert = true
|
||||
|
||||
fmt.Print(" > Mail server host (default localhost): ")
|
||||
fmt.Scanln(&conf.EmailHost)
|
||||
|
||||
if len(conf.EmailHost) == 0 {
|
||||
conf.EmailHost = "localhost"
|
||||
}
|
||||
|
||||
fmt.Print(" > Mail server port (default 25): ")
|
||||
fmt.Scanln(&conf.EmailPort)
|
||||
|
||||
if len(conf.EmailPort) == 0 {
|
||||
conf.EmailPort = "25"
|
||||
}
|
||||
|
||||
fmt.Print(" > Mail sender address (default semaphore@localhost): ")
|
||||
fmt.Scanln(&conf.EmailSender)
|
||||
|
||||
if len(conf.EmailSender) == 0 {
|
||||
conf.EmailSender = "semaphore@localhost"
|
||||
}
|
||||
|
||||
fmt.Print(" > Web root URL (default http://localhost:8010/): ")
|
||||
fmt.Scanln(&conf.WebHost)
|
||||
|
||||
if len(conf.WebHost) == 0 {
|
||||
conf.WebHost = "http://localhost:8010/"
|
||||
}
|
||||
|
||||
} else {
|
||||
conf.EmailAlert = false
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user