Skip to content

Commit ef2dadc

Browse files
committed
add protocoll
1 parent bc90889 commit ef2dadc

File tree

2 files changed

+58
-58
lines changed

2 files changed

+58
-58
lines changed

Install/customize_firmware.sh

+29-29
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ uci set wireless.default_radio1.ssid='CyberSec-Box'
168168
uci set uhttpd.main.index_page='index.php'
169169
uci set uhttpd.main.interpreter='.php=/usr/bin/php-cgi'
170170
processes=$(uci commit && reload_config)
171-
wait $processes >> install_customice.log
172-
/etc/init.d/uhttpd restart >> install_customice.log
173-
/etc/init.d/network restart >> install_customice.log
171+
wait $processes >> /root/install_customice.log
172+
/etc/init.d/uhttpd restart >> /root/install_customice.log
173+
/etc/init.d/network restart >> /root/install_customice.log
174174
echo
175175
echo 'Default Country-Settings'
176176
echo
@@ -246,12 +246,12 @@ if [ ! -f "$FILE" ]
246246
processes=$(rm /www/luci-static/resources/view/dashboard/css/c*.css)
247247
wait $processes
248248
fi
249-
process50=$(wget --waitretry=10 -t 5 -O /root/openWRT23_install.sh https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/Install/openWRT23_install.sh)
249+
process50=$(wget --waitretry=10 -t 5 -O /root/openWRT23_install.sh https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/Install/openWRT23_install.sh >> /root/install_customice.log)
250250
wait $process50
251251

252252
if [ "$(ls /www/luci-static/bootstrap/logo.svg)" != "" ]
253253
then
254-
processes=$(rm /www/luci-static/bootstrap/logo*.*)
254+
processes=$(rm /www/luci-static/bootstrap/logo*.* >> /root/install_customice.log)
255255
wait $processes
256256
fi
257257

@@ -310,9 +310,9 @@ create_hotspot(){
310310
uci set wireless.radio0.country='DE'
311311
uci set wireless.radio0.channel='auto'
312312
uci set wireless.radio0.hwmode='11n'
313-
uci delete wireless.radio0.disabled >> install_customice.log
313+
uci delete wireless.radio0.disabled >> /root/install_customice.log
314314
processes=$(uci commit && reload_config)
315-
wait $processes >> install_customice.log
315+
wait $processes >> /root/install_customice.log
316316
if [ ! -d "$FILE" ]
317317
then
318318
create_hotspot_sub
@@ -414,58 +414,58 @@ set_uhttpd() {
414414
uci set uhttpd.main.index_page='index.php'
415415
uci set uhttpd.main.interpreter='.php=/usr/bin/php-cgi'
416416
processes=$(uci commit && reload_config)
417-
wait $processes >> install_customice.log
417+
wait $processes >> /root/install_customice.log
418418
}
419419

420420
#-------------------------start---------------------------------------
421421

422422
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S':'%N) ' Starting...'
423-
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S':'%N) ' Starting...' >> install_customice.log
423+
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S':'%N) ' Starting...' >> /root/install_customice.log
424424
echo
425-
echo >> install_customice.log
425+
echo >> /root/install_customice.log
426426
echo $main_release
427427
echo
428428
echo 'Automation Install'
429429
echo
430-
echo >> install_customice.log
430+
echo >> /root/install_customice.log
431431
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S)' Customize Firmware'
432-
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S)' Customize Firmware' >> install_customice.log
433-
customize_firmware >> install_customice.log
432+
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S)' Customize Firmware' >> /root/install_customice.log
433+
customize_firmware >> /root/install_customice.log
434434

435435
echo
436-
echo >> install_customice.log
436+
echo >> /root/install_customice.log
437437
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S)' Create Hotspot'
438-
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S)' Create Hotspot' >> install_customice.log
439-
create_hotspot >> install_customice.log
438+
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S)' Create Hotspot' >> /root/install_customice.log
439+
create_hotspot >> /root/install_customice.log
440440

441441
echo
442-
echo >> install_customice.log
442+
echo >> /root/install_customice.log
443443
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S)' Set uhttpd'
444-
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S)' Set uhttpd' >> install_customice.log
445-
set_uhttpd >> install_customice.log
444+
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S)' Set uhttpd' >> /root/install_customice.log
445+
set_uhttpd >> /root/install_customice.log
446446

447447
cat << EOF > /etc/rc.local
448448
if [ ! -f /root/openWRT23_install.sh ] && [ ! -f www/luci-static/bootstrap/cascade.css ]
449449
then
450-
rm /www/index.html && sleep 20
450+
rm /www/index.html && sleep 20 >> /root/install_rc_local.log
451451
if [ ! -f /root/customize_firmware.sh ]
452452
then
453-
wget --waitretry=10 -t 5 -O /root/customize_firmware.sh https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/Install/customize_firmware.sh && sh /root/customize_firmware.sh & wait
453+
wget --waitretry=10 -t 5 -O /root/customize_firmware.sh https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/Install/customize_firmware.sh && sh /root/customize_firmware.sh >> /root/install_rc_local.log & wait
454454
fi
455-
wget --waitretry=10 -t 5 -O /root/openWRT23_install.sh https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/Install/openWRT23_install.sh
456-
wget https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/www/index.php -P /www/
457-
wget https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/www/output.php -P /www/
455+
wget --waitretry=10 -t 5 -O /root/openWRT23_install.sh https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/Install/openWRT23_install.sh >> /root/install_rc_local.log
456+
wget https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/www/index.php -P /www/ >> /root/install_rc_local.log
457+
wget https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/www/output.php -P /www/ >> /root/install_rc_local.log
458458
else
459-
rm /root/*.sh
460-
rm /root/*.sh.*
459+
rm /root/*.sh >> /root/install_rc_local.log
460+
rm /root/*.sh.* >> /root/install_rc_local.log
461461
fi
462462
if [ ! -f /root/run ]
463463
then
464-
echo "'"'$(date) "'"> /root/run
465-
rm /root/customize_firmware.sh
464+
echo ' $(date) ' > /root/run >> /root/install_rc_local.log
465+
rm /root/customize_firmware.sh >> /root/install_rc_local.log
466466
exit 0
467467
fi
468-
rm /etc/rc.local
468+
rm /etc/rc.local >> /root/install_rc_local.log
469469
echo "" > /www/phpinfo.php
470470
echo "exit 0" > /etc/rc.local
471471
EOF

customize_firmware.sh

+29-29
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ uci set wireless.default_radio1.ssid='CyberSec-Box'
168168
uci set uhttpd.main.index_page='index.php'
169169
uci set uhttpd.main.interpreter='.php=/usr/bin/php-cgi'
170170
processes=$(uci commit && reload_config)
171-
wait $processes >> install_customice.log
172-
/etc/init.d/uhttpd restart >> install_customice.log
173-
/etc/init.d/network restart >> install_customice.log
171+
wait $processes >> /root/install_customice.log
172+
/etc/init.d/uhttpd restart >> /root/install_customice.log
173+
/etc/init.d/network restart >> /root/install_customice.log
174174
echo
175175
echo 'Default Country-Settings'
176176
echo
@@ -246,12 +246,12 @@ if [ ! -f "$FILE" ]
246246
processes=$(rm /www/luci-static/resources/view/dashboard/css/c*.css)
247247
wait $processes
248248
fi
249-
process50=$(wget --waitretry=10 -t 5 -O /root/openWRT23_install.sh https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/Install/openWRT23_install.sh)
249+
process50=$(wget --waitretry=10 -t 5 -O /root/openWRT23_install.sh https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/Install/openWRT23_install.sh >> /root/install_customice.log)
250250
wait $process50
251251

252252
if [ "$(ls /www/luci-static/bootstrap/logo.svg)" != "" ]
253253
then
254-
processes=$(rm /www/luci-static/bootstrap/logo*.*)
254+
processes=$(rm /www/luci-static/bootstrap/logo*.* >> /root/install_customice.log)
255255
wait $processes
256256
fi
257257

@@ -310,9 +310,9 @@ create_hotspot(){
310310
uci set wireless.radio0.country='DE'
311311
uci set wireless.radio0.channel='auto'
312312
uci set wireless.radio0.hwmode='11n'
313-
uci delete wireless.radio0.disabled >> install_customice.log
313+
uci delete wireless.radio0.disabled >> /root/install_customice.log
314314
processes=$(uci commit && reload_config)
315-
wait $processes >> install_customice.log
315+
wait $processes >> /root/install_customice.log
316316
if [ ! -d "$FILE" ]
317317
then
318318
create_hotspot_sub
@@ -414,58 +414,58 @@ set_uhttpd() {
414414
uci set uhttpd.main.index_page='index.php'
415415
uci set uhttpd.main.interpreter='.php=/usr/bin/php-cgi'
416416
processes=$(uci commit && reload_config)
417-
wait $processes >> install_customice.log
417+
wait $processes >> /root/install_customice.log
418418
}
419419

420420
#-------------------------start---------------------------------------
421421

422422
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S':'%N) ' Starting...'
423-
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S':'%N) ' Starting...' >> install_customice.log
423+
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S':'%N) ' Starting...' >> /root/install_customice.log
424424
echo
425-
echo >> install_customice.log
425+
echo >> /root/install_customice.log
426426
echo $main_release
427427
echo
428428
echo 'Automation Install'
429429
echo
430-
echo >> install_customice.log
430+
echo >> /root/install_customice.log
431431
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S)' Customize Firmware'
432-
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S)' Customize Firmware' >> install_customice.log
433-
customize_firmware >> install_customice.log
432+
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S)' Customize Firmware' >> /root/install_customice.log
433+
customize_firmware >> /root/install_customice.log
434434

435435
echo
436-
echo >> install_customice.log
436+
echo >> /root/install_customice.log
437437
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S)' Create Hotspot'
438-
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S)' Create Hotspot' >> install_customice.log
439-
create_hotspot >> install_customice.log
438+
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S)' Create Hotspot' >> /root/install_customice.log
439+
create_hotspot >> /root/install_customice.log
440440

441441
echo
442-
echo >> install_customice.log
442+
echo >> /root/install_customice.log
443443
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S)' Set uhttpd'
444-
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S)' Set uhttpd' >> install_customice.log
445-
set_uhttpd >> install_customice.log
444+
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S)' Set uhttpd' >> /root/install_customice.log
445+
set_uhttpd >> /root/install_customice.log
446446

447447
cat << EOF > /etc/rc.local
448448
if [ ! -f /root/openWRT23_install.sh ] && [ ! -f www/luci-static/bootstrap/cascade.css ]
449449
then
450-
rm /www/index.html && sleep 20
450+
rm /www/index.html && sleep 20 >> /root/install_rc_local.log
451451
if [ ! -f /root/customize_firmware.sh ]
452452
then
453-
wget --waitretry=10 -t 5 -O /root/customize_firmware.sh https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/Install/customize_firmware.sh && sh /root/customize_firmware.sh & wait
453+
wget --waitretry=10 -t 5 -O /root/customize_firmware.sh https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/Install/customize_firmware.sh && sh /root/customize_firmware.sh >> /root/install_rc_local.log & wait
454454
fi
455-
wget --waitretry=10 -t 5 -O /root/openWRT23_install.sh https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/Install/openWRT23_install.sh
456-
wget https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/www/index.php -P /www/
457-
wget https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/www/output.php -P /www/
455+
wget --waitretry=10 -t 5 -O /root/openWRT23_install.sh https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/Install/openWRT23_install.sh >> /root/install_rc_local.log
456+
wget https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/www/index.php -P /www/ >> /root/install_rc_local.log
457+
wget https://github.com/CyberAndi/CyberSecurity-Box/raw/CyberSecurity-Box/www/output.php -P /www/ >> /root/install_rc_local.log
458458
else
459-
rm /root/*.sh
460-
rm /root/*.sh.*
459+
rm /root/*.sh >> /root/install_rc_local.log
460+
rm /root/*.sh.* >> /root/install_rc_local.log
461461
fi
462462
if [ ! -f /root/run ]
463463
then
464-
echo "'"'$(date) "'"> /root/run
465-
rm /root/customize_firmware.sh
464+
echo ' $(date) ' > /root/run >> /root/install_rc_local.log
465+
rm /root/customize_firmware.sh >> /root/install_rc_local.log
466466
exit 0
467467
fi
468-
rm /etc/rc.local
468+
rm /etc/rc.local >> /root/install_rc_local.log
469469
echo "" > /www/phpinfo.php
470470
echo "exit 0" > /etc/rc.local
471471
EOF

0 commit comments

Comments
 (0)