Browse Source

New option backup_target in profiles to backup the targetcam before replacing

pull/9/head
WXbet 5 years ago
parent
commit
61c44b6267
  1. 2
      support/functions/_uploadcam

2
support/functions/_uploadcam

@ -37,7 +37,7 @@ upload_cam(){
if [ "$replace_target" == "y" ];then if [ "$replace_target" == "y" ];then
echo -en "$p_l REPLACE > $y_l$targetcam$re_"; echo -en "$p_l REPLACE > $y_l$targetcam$re_";
sshpass -p "$password" ssh -p "$port" -o StrictHostKeyChecking=no "$loginname@$ip" \ sshpass -p "$password" ssh -p "$port" -o StrictHostKeyChecking=no "$loginname@$ip" \
"cd /tmp;if [ -f \"$buildcamname\" ];then if [ -f \"$targetcam\" ];then mv -f \"$buildcamname\" \"$targetcam\";fi;fi;exit;"; "cd /tmp;if [ -f \"$buildcamname\" ];then if [ -f \"$targetcam\" ];then if [ \"$backup_target\" == \"y\" ]; then cp -pf \"$targetcam\" \"$targetcam.backup\"; fi;mv -f \"$buildcamname\" \"$targetcam\";fi;fi;exit;";
echo -e "$g_l$txt_done!$re_"; echo -e "$g_l$txt_done!$re_";
fi; fi;

Loading…
Cancel
Save