forked from tano-systems/luci-app-tn-logview
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-deploy.cmd
More file actions
38 lines (27 loc) · 735 Bytes
/
test-deploy.cmd
File metadata and controls
38 lines (27 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@echo off
set LUCI_LUASRC_PATH=/usr/lib/lua/5.1/luci
set LUCI_HTDOCS_PATH=/www
set LUCI_ROOT_PATH=/
set HOST=%1
set PASSWORD=%2
set EXTRA_OPTIONS=
if NOT [%PASSWORD%] == [] (
set EXTRA_OPTIONS=-pw "%PASSWORD%"
)
if [%HOST%] == [] goto host_empty
IF EXIST %~dp0/luasrc (
pscp -r %EXTRA_OPTIONS% %~dp0/luasrc/* %HOST%:%LUCI_LUASRC_PATH%
)
IF EXIST %~dp0/htdocs (
pscp -r %EXTRA_OPTIONS% %~dp0/htdocs/* %HOST%:%LUCI_HTDOCS_PATH%
)
IF EXIST %~dp0/root (
pscp -r %EXTRA_OPTIONS% %~dp0/root/* %HOST%:%LUCI_ROOT_PATH%
)
rem Clear LuCI index cache
plink %EXTRA_OPTIONS% %HOST% "/etc/init.d/uhttpd stop; rm -rf /tmp/luci-*; /etc/init.d/uhttpd start"
echo Success
goto done
:host_empty
echo Usage: %0 [user@]host [password]
:done