mirror of
https://github.com/photoprism/photoprism.git
synced 2025-10-05 16:57:17 +08:00
CLI: Add cluster operations and management commands #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -27,6 +27,7 @@ package commands
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/sevlyar/go-daemon"
|
||||
@@ -37,7 +38,15 @@ import (
|
||||
"github.com/photoprism/photoprism/pkg/fs"
|
||||
)
|
||||
|
||||
const NONINTERACTIVE = "noninteractive"
|
||||
|
||||
var log = event.Log
|
||||
var cliMode = strings.ToLower(os.Getenv(config.EnvVar("cli")))
|
||||
|
||||
// RunNonInteractively checks if command should run non-interactively.
|
||||
func RunNonInteractively(confirmed bool) bool {
|
||||
return confirmed || cliMode == NONINTERACTIVE
|
||||
}
|
||||
|
||||
// PhotoPrism contains the photoprism CLI (sub-)commands.
|
||||
var PhotoPrism = []*cli.Command{
|
||||
@@ -66,6 +75,7 @@ var PhotoPrism = []*cli.Command{
|
||||
PasswdCommand,
|
||||
UsersCommands,
|
||||
ClientsCommands,
|
||||
ClusterCommands,
|
||||
AuthCommands,
|
||||
ShowCommands,
|
||||
VersionCommand,
|
||||
|
Reference in New Issue
Block a user