Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Commit 7cd8f64

Browse files
authored
fix: change app name in cmd (#36)
1 parent b8e6083 commit 7cd8f64

File tree

7 files changed

+14
-13
lines changed

7 files changed

+14
-13
lines changed

cmd/admin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ var AdminCmd = &cobra.Command{
2626
} else {
2727
utils.Log.Infof("Admin user's username: %s", admin.Username)
2828
utils.Log.Infof("The password can only be output at the first startup, and then stored as a hash value, which cannot be reversed")
29-
utils.Log.Infof("You can reset the password with a random string by running [alist admin random]")
30-
utils.Log.Infof("You can also set a new password by running [alist admin set NEW_PASSWORD]")
29+
utils.Log.Infof("You can reset the password with a random string by running [openlist admin random]")
30+
utils.Log.Infof("You can also set a new password by running [openlist admin set NEW_PASSWORD]")
3131
}
3232
},
3333
}

cmd/kill.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
package cmd
22

33
import (
4+
"os"
5+
46
log "github.com/sirupsen/logrus"
57
"github.com/spf13/cobra"
6-
"os"
78
)
89

910
// KillCmd represents the kill command
1011
var KillCmd = &cobra.Command{
1112
Use: "kill",
12-
Short: "Force kill alist server process by daemon/pid file",
13+
Short: "Force kill openlist server process by daemon/pid file",
1314
Run: func(cmd *cobra.Command, args []string) {
1415
kill()
1516
},
@@ -18,7 +19,7 @@ var KillCmd = &cobra.Command{
1819
func kill() {
1920
initDaemon()
2021
if pid == -1 {
21-
log.Info("Seems not have been started. Try use `alist start` to start server.")
22+
log.Info("Seems not have been started. Try use `openlist start` to start server.")
2223
return
2324
}
2425
process, err := os.FindProcess(pid)

cmd/restart.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
// RestartCmd represents the restart command
1111
var RestartCmd = &cobra.Command{
1212
Use: "restart",
13-
Short: "Restart alist server by daemon/pid file",
13+
Short: "Restart openlist server by daemon/pid file",
1414
Run: func(cmd *cobra.Command, args []string) {
1515
stop()
1616
start()

cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
)
1313

1414
var RootCmd = &cobra.Command{
15-
Use: "alist",
15+
Use: "openlist",
1616
Short: "A file list program that supports multiple storage.",
1717
Long: `A file list program that supports multiple storage,
1818
built with love by Xhofe and friends in Go/Solid.js.

cmd/start.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
// StartCmd represents the start command
1717
var StartCmd = &cobra.Command{
1818
Use: "start",
19-
Short: "Silent start alist server with `--force-bin-dir`",
19+
Short: "Silent start openlist server with `--force-bin-dir`",
2020
Run: func(cmd *cobra.Command, args []string) {
2121
start()
2222
},
@@ -27,7 +27,7 @@ func start() {
2727
if pid != -1 {
2828
_, err := os.FindProcess(pid)
2929
if err == nil {
30-
log.Info("alist already started, pid ", pid)
30+
log.Info("openlist already started, pid ", pid)
3131
return
3232
}
3333
}
@@ -52,7 +52,7 @@ func start() {
5252
log.Infof("success start pid: %d", cmd.Process.Pid)
5353
err = os.WriteFile(pidFile, []byte(strconv.Itoa(cmd.Process.Pid)), 0666)
5454
if err != nil {
55-
log.Warn("failed to record pid, you may not be able to stop the program with `./alist stop`")
55+
log.Warn("failed to record pid, you may not be able to stop the program with `./openlist stop`")
5656
}
5757
}
5858

cmd/stop_default.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
// StopCmd represents the stop command
1414
var StopCmd = &cobra.Command{
1515
Use: "stop",
16-
Short: "Stop alist server by daemon/pid file",
16+
Short: "Stop openlist server by daemon/pid file",
1717
Run: func(cmd *cobra.Command, args []string) {
1818
stop()
1919
},
@@ -22,7 +22,7 @@ var StopCmd = &cobra.Command{
2222
func stop() {
2323
initDaemon()
2424
if pid == -1 {
25-
log.Info("Seems not have been started. Try use `alist start` to start server.")
25+
log.Info("Seems not have been started. Try use `openlist start` to start server.")
2626
return
2727
}
2828
process, err := os.FindProcess(pid)

cmd/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
// VersionCmd represents the version command
1616
var VersionCmd = &cobra.Command{
1717
Use: "version",
18-
Short: "Show current version of AList",
18+
Short: "Show current version of OpenList",
1919
Run: func(cmd *cobra.Command, args []string) {
2020
goVersion := fmt.Sprintf("%s %s/%s", runtime.Version(), runtime.GOOS, runtime.GOARCH)
2121

0 commit comments

Comments
 (0)