OpenWrt procd service script and LuCI JavaScript interface for copyparty (https://github.com/9001/copyparty), a self-hosted file sharing server. Features: - procd service with UCI-driven volumes, accounts, and TLS cert - LuCI view: settings, volume/account grids, live status + start/stop - ACME TLS support via combined key+fullchain PEM (--cert flag) - Auto-respawn and reload-on-config-change via service_triggers
27 lines
950 B
Bash
27 lines
950 B
Bash
#!/bin/sh
|
|
# Install luci-app-copyparty onto an OpenWrt device.
|
|
# Run on the device itself, or adapt for scp.
|
|
|
|
set -e
|
|
|
|
DEST_INIT=/etc/init.d/copyparty
|
|
DEST_UCI=/etc/config/copyparty
|
|
DEST_VIEW=/www/luci-static/resources/view/copyparty.js
|
|
DEST_MENU=/usr/share/luci/menu.d/luci-app-copyparty.json
|
|
DEST_ACL=/usr/share/rpcd/acl.d/luci-app-copyparty.json
|
|
|
|
SCRIPT_DIR=$(dirname "$0")
|
|
|
|
cp "$SCRIPT_DIR/etc/init.d/copyparty" "$DEST_INIT"
|
|
chmod +x "$DEST_INIT"
|
|
|
|
[ -f "$DEST_UCI" ] || cp "$SCRIPT_DIR/etc/config/copyparty" "$DEST_UCI"
|
|
|
|
cp "$SCRIPT_DIR/www/luci-static/resources/view/copyparty.js" "$DEST_VIEW"
|
|
cp "$SCRIPT_DIR/usr/share/luci/menu.d/luci-app-copyparty.json" "$DEST_MENU"
|
|
cp "$SCRIPT_DIR/usr/share/rpcd/acl.d/luci-app-copyparty.json" "$DEST_ACL"
|
|
|
|
/etc/init.d/rpcd restart
|
|
|
|
echo "Installed. Edit $DEST_UCI then: /etc/init.d/copyparty enable && /etc/init.d/copyparty start"
|