From b794a7db5c2850138504d1e05a2c24f848a73ce1 Mon Sep 17 00:00:00 2001 From: BenTechy66 Date: Wed, 16 Sep 2020 22:23:19 +0100 Subject: [PATCH] start adding watchtower stuff --- cmd/install/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/install/main.go b/cmd/install/main.go index ce9c426..27a1740 100644 --- a/cmd/install/main.go +++ b/cmd/install/main.go @@ -27,6 +27,7 @@ type options struct { UserEmail string AWSAccessKeyId string AWSSecretAccessKey string + UseWatchtower bool } var installShellFlag = flag.Bool("shell", false, "Whether to install Shell") @@ -38,6 +39,7 @@ var apiDomainFlag = flag.String("apidomain", "", "The public URL of your core in var userEmailFlag = flag.String("email", "", "The email sent to LetsEncrypt for certificate provisioning") var AWSAccessKeyIdFlag = flag.String("awsaccesskeyid", "", "AWS Acess Key ID (For mail)") var AWSSecretAccessKeyFlag = flag.String("awsaccesskeysecret", "", "AWS Secret Access Key (For mail)") +var UseWatchtowerFlag = flag.Bool("usewatchtower", false, "Whether to use Watchtower to auto-update RACTF.") func main() { flag.Parse() @@ -146,6 +148,7 @@ func main() { } installOptions.SecretKey = GenerateRandomString(64) + installOptions.UseWatchtower = *UseWatchtowerFlag fmt.Println(Green("Proceeding with installation of"), Bold(installCount), Green("components.")) @@ -165,7 +168,7 @@ func main() { fmt.Println(Blue(strings.Repeat("-", 30))) fmt.Println(Yellow("What you still need to do (if you haven't already!):")) fmt.Println(" - ", Green("Set your DNS so that the requisite domains point to this box")) - fmt.Println(" - ", Green("Run"), Yellow(fmt.Sprintf("`systemctl enable --now ractf_%s`", installOptions.InternalName)), Green("to start the RACTF service on this box.")) + fmt.Println(" - ", Green("Run"), Yellow(fmt.Sprintf("`systemctl enable --now ractf_%s`", installOptions.InternalName)), Green("to start the RACTF service on this box."), Red("(This might take a while on first run!)")) } func generateAndWriteSystemdUnit(options options) error {