Giter Club home page Giter Club logo

Comments (5)

sbwml avatar sbwml commented on August 19, 2024 1

我的建议:

1、前往 alist 官方仓库,下载对应架构的 musl 二进制,解压并拷贝 alist 文件到 u盘(755 权限)。 https://github.com/alist-org/alist/releases

2、创建 procd 脚本,新建文件(755 权限):/etc/init.d/alist

文件内容:

#!/bin/sh /etc/rc.common

START=99
USE_PROCD=1
PROG=/mnt/usb/alist  # 修改为 u盘 alist 二进制文件路径
CONFIG_DIR=/mnt/usb/data  # 修改为 u盘 上的任意一个目录路径

start_service() {
	procd_open_instance
	procd_set_param command $PROG
	procd_append_param command server --data $CONFIG_DIR
	procd_set_param stdout 1
	procd_set_param stderr 1
	procd_set_param respawn
	procd_close_instance
}

reload_service() {
	stop
	sleep 1
	start
}

3、设置开机自启:/etc/init.d/alist enable

4、启动 alist :/etc/init.d/alist start

到此,你已经可以通过 http://路由器网关:5244 访问到 Alist 页面

from luci-app-alist.

sbwml avatar sbwml commented on August 19, 2024

自定义执行文件路径意味着 luci 不能依赖 alist 二进制包,这对正常的插件构建增加了包管理操作。

如果你的设备是空间非常小的硬路由,我不建议你使用 luci,而是去 alist 官方仓库直接下载二进制文件来运行。上游提供的二进制文件都是经过 upx 压缩后的,对小空间设备会更友好。毕竟 alist 运行其实就是一行启动命令的事情,很多时候根本不需用到 luci 来管理。

from luci-app-alist.

yipush avatar yipush commented on August 19, 2024

自定义执行文件路径意味着 luci 不能依赖 alist 二进制包,这对正常的插件构建增加了包管理操作。

如果你的设备是空间非常小的硬路由,我不建议你使用 luci,而是去 alist 官方仓库直接下载二进制文件来运行。上游提供的二进制文件都是经过 upx 压缩后的,对小空间设备会更友好。毕竟 alist 运行其实就是一行启动命令的事情,很多时候根本不需用到 luci 来管理。

好的,非常感谢您的回复,这台硬路由明天试试按您给出的方法配置,我还有一台软路由装了您这个插件以后,alist的日志会强制写到openwrt的日志里,导致openwrt日志全是alist的日志,不知道这是alist上游源码的问题还是您这边配置的问题呢?能否去除强制写入到openwrt的日志里呢?非常感谢。

from luci-app-alist.

sbwml avatar sbwml commented on August 19, 2024

删除这两行代码,或设置值为 0 可以禁止它输出日志到 syslog https://github.com/sbwml/luci-app-alist/blob/master/luci-app-alist/root/etc/init.d/alist#L69-L70

from luci-app-alist.

yipush avatar yipush commented on August 19, 2024

删除这两行代码,或设置值为 0 可以禁止它输出日志到 syslog https://github.com/sbwml/luci-app-alist/blob/master/luci-app-alist/root/etc/init.d/alist#L69-L70

非常感谢,希望您这边也更新一下,毕竟有了单独的开启日志,强制写入系统日志感觉不太好

from luci-app-alist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.