/etc/rsyncd.conf uid = dcos0
gid = dcos0
use chroot = no
read only = false write
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsyncd.lock
[openwrt]
path = /openwrt/
ignore errors
read only = false
list = false
hosts allow = 0.0.0.0/0
hosts deny = 0.0.0.0/0
auth users = dcos0
secrets file = /etc/rsync.password
~
rsync.password
dcos0:8855013
删除所有文件
rm -rf /etc/tvheadend/*
启动服务
rsync --daemon
#!/bin/sh
opkg update
opkg install rsyncd_3.1.3-1_x86_64.ipk
opkg install http://openwrt.proxy.ustclug.org/releases/18.06.1/packages/x86_64/packages/rsyncd_3.1.3-1_x86_64.ipk
opkg install http://openwrt.proxy.ustclug.org/releases/18.06.1/packages/x86_64/packages/rsync_3.1.3-1_x86_64.ipk
opkg install http://openwrt.proxy.ustclug.org/releases/18.06.1/packages/i386_pentium4/packages/rsync_3.1.3-1_i386_pentium4.ipk
echo “8855013”>/etc/rsync.passwd
chmod 600 /etc/rsync.passwd
rsync -av --progress --delete rsync://dcos0@wifisx.com/openwrt/sxty/etc/tvheadend/* /etc/tvheadend --password-file=/etc/rsync.passwd
rsync -av --progress --delete rsync://dcos0@wifisx.com/openwrt/sxty/etc/config/frp /etc/config/ --password-file=/etc/rsync.passwd
rsync -av --progress --delete rsync://dcos0@wifisx.com/openwrt/sxty/usr/libexec/login.sh /usr/libexec/ --password-file=/etc/rsync.passwd
rsync -av --progress --delete rsync://dcos0@wifisx.com/openwrt/sxty/etc/config/system /etc/config/ --password-file=/etc/rsync.passwd
rsync -av --progress --delete rsync://dcos0@wifisx.com/openwrt/sxty/etc/banner /etc/ --password-file=/etc/rsync.passwd
rsync -av --progress --delete rsync://dcos0@wifisx.com/openwrt/sxty/etc/crontabs/ /etc/crontabs/ --password-file=/etc/rsync.passwd
chmod 777 /usr/libexec/login.sh
chmod 777/etc/crontabs/.
rsync -av --progress --delete rsync://dcos0@wifisx.com/openwrt/sxty/etc/tvheadend/accesscontrol/ /etc/tvheadend/accesscontrol --password-file=/etc/rsync.passwd
rsync -av --progress --delete rsync://dcos0@wifisx.com/openwrt/sxty/etc/tvheadend/passwd/ /etc/tvheadend/passwd --password-file=/etc/rsync.passwd
rsync -av --progress --delete rsync://dcos0@wifisx.com/openwrt/sxty/etc/passwd /etc/ --password-file=/etc/rsync.passwd
rsync -av --progress --delete rsync://dcos0@wifisx.com/openwrt/sxty/etc/shadow /etc/ --password-file=/etc/rsync.passwd
chmod 600 /etc/passwd
chmod 600 /etc/shadow
chmod 777 /usr/libexec/login.sh
序列号 frp 域名 配置
echo “序列号”>/etc/xuliehao.txt
xuliehao=$(cat /etc/xuliehao.txt)
echo
x
u
l
i
e
h
a
o
s
e
d
−
i
′
s
/
12345678910
/
′
{xuliehao} sed -i 's/12345678910/'
xuliehaosed−i′s/12345678910/′xuliehao’/g’ /etc/config/frp
定时任务 开机启动脚本
crond restart
/usr/sbin/crond restart
/rom/etc/init.d/cron restart
service cron restart
service crond restart
/etc/init.d/uhttpd restart
Openwrt上开启sftp,使用SecureCRT,WinSCp等传输文件
opkg update
opkg install vsftpd openssh-sftp-server
/etc/init.d/cron enable
#!/bin/sh /etc/rc.common
START=99
STOP=15
start(crond restart) {
echo start
#commands to launch application, such as above
}
stop() {
echo stop
#commands to kill application
}
查看系统安装的软件源
opkg list-installed
需要卸载的软件列表
opkg remove shadowsocks-libev-config - 3.2.1-1
opkg remove shadowsocks-libev-ss-redir - 3.2.1-1
opkg remove shadowsocksr-libev-alt - 2.5.6-3
opkg remove shadowsocksr-libev-server - 2.5.6-3
opkg remove shadowsocksr-libev-ssr-local - 2.5.6-3
opkg remove luci-i18n-adbyby-plus-zh-cn - 2.0-39
opkg remove adbyby - 2.7-20181023
opkg remove luci-app-adbyby-plus - 2.0-39
opkg remove openwrt-brook-tproxy - 1.0.2-1
opkg remove luci-app-vlmcsd - 1.0-2
opkg remove luci-i18n-vlmcsd-zh-cn - 1.0-2
opkg remove vlmcsd - svn1112-1
opkg remove luci-app-udpxy - git-18.296.11678-2bbc1e3-1
opkg remove udpxy - 2016-09-18-53e4672a7522311c40e9f6110ff256041c52c8b4-1
opkg remove haproxy - 1.8.4-01
opkg remove luci-app-haproxy-tcp - 1.5-1
opkg remove luci-app-macvlan - 1.0.0-1
opkg remove kmod-macvlan - 4.9.138-1
opkg remove luci-app-mwan3helper - 1-2
opkg remove luci-i18n-mwan3helper-zh-cn - 1-2
opkg remove gargoyle-firewall-util - 1.0.0-1
opkg remove luci-app-qos-gargoyle - 1.3.8-1
opkg remove luci-i18n-qos-gargoyle-zh-cn - 1.3.8-1
opkg remove qos-gargoyle - 1.0.1-1
opkg remove ChinaDNS - 1.3.2-5
opkg remove luci-app-chinadns - 1.6.2-1
opkg remove luci-app-watchcat - git-18.296.11678-2bbc1e3-1
opkg remove luci-i18n-watchcat-zh-cn - git-18.296.11678-2bbc1e3-1
opkg remove watchcat - 1-7
opkg remove kmod-macvlan - 4.9.138-1
opkg remove luci-app-v2ray - 1.4-11
opkg remove luci-i18n-v2ray-zh-cn - 1.4-11
opkg remove v2ray - 4.5.0-2
opkg remove dnsforwarder - 6-3
opkg remove amule - 2.3.2-2
opkg remove luci-app-amule - git-18.324.52427-05273ff-1
opkg remove luci-i18n-amule-zh-cn - git-18.324.52427-05273ff-1
opkg remove aria2 - 1.34.0-1
opkg remove luci-app-aria2 - 1.0.2-2
opkg remove luci-i18n-aria2-zh-cn - 1.0.2-2
opkg remove webui-aria2 - 2018-07-09-3237bf00-1
opkg remove luci-app-minidlna - git-18.296.11678-2bbc1e3-1
opkg remove luci-i18n-minidlna-zh-cn - git-18.296.11678-2bbc1e3-1
opkg remove minidlna - 1.2.1-3
opkg remove transmission-cli-openssl - 2.93-7
opkg remove transmission-daemon-openssl - 2.93-7
opkg remove transmission-remote-openssl - 2.93-7
opkg remove transmission-web-control - 1.6.0-alpha-1
opkg remove luci-app-mjpg-streamer - git-18.296.11678-2bbc1e3-1
opkg remove luci-i18n-mjpg-streamer-zh-cn - git-18.296.11678-2bbc1e3-1
opkg remove mjpg-streamer - r182-10
opkg remove luci-app-njitclient - 1.0-1
opkg remove luci-app-ssr-plus - 1-66
opkg remove luci-app-ssr-pro - 2-35
opkg remove luci-i18n-ssr-pro-zh-cn - 2-35
opkg remove kmod-wireguard - 4.9.138+0.0.20181119-1
opkg remove luci-app-wireguard - git-18.296.11678-2bbc1e3-1
opkg remove luci-i18n-wireguard-zh-cn - git-18.296.11678-2bbc1e3-1
opkg remove luci-proto-wireguard - git-18.296.11678-2bbc1e3-1
opkg remove wireguard-tools - 0.0.20181119-1
rm usr/lib/lua/luci/view/terminal.htm
rm usr/lib/lua/luci/view/admin_system/packages.htm
rm usr/lib/lua/luci/model/cbi/admin_system/startup.lua
rm usr/lib/lua/luci/model/cbi/admin_system/backupfiles.lua
opkg remove
opkg remove
opkg remove
opkg remove
opkg remove
opkg remove
opkg remove
opkg remove
opkg remove
opkg remove
opkg remove