Tank cannon and artillery recoil system

I am trying to make a cannon recoil system, acting like the real one.
I want the cannon back, in the shot, quickly and return smoothly, due the shock absorber systems.
I try but I can’t fire again, this code only let me to shot once, I don’t know why.
Please someone help me!

thank you in advance!

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Tiro : MonoBehaviour {

    private Vector3 initPos = new Vector3(0.017f, -1.6f, 0);
    private Vector3 finalPos = new Vector3(0.017f, -1f, 0);
    private float distance  = 0.6f;
    private float distance2 = 0;
    private float travelTime = 0.1f;
    private float currentLerpTime;
    private float currentLerpTime2;
    public float keyHit = 0;
    private float travelTime_back = 1f;
    private Vector3 backPos;

    // Use this for initialization
    void Start (){

      //  initPos = transform.localPosition = new Vector3 (0.017f,-1.6f,0);
       // finalPos = transform.localPosition = new Vector3(0.017f, -1f, 0); 
       // backPos = transform.localPosition + Vector3.down * distance2;
       
    }
    

    // Update is called once per frame
    void Update() {
        

        if (Input.GetKeyDown(KeyCode.F) && keyHit == 0 && transform.localPosition == initPos)
        {

            keyHit = 1;
            
        }


        if (keyHit == 1)
        {
            currentLerpTime += Time.deltaTime;

            if (currentLerpTime >= travelTime)
            {

                currentLerpTime = travelTime;
            }

            float perc = currentLerpTime / travelTime;
            transform.localPosition = Vector3.Lerp(initPos , finalPos, perc);//This put the barrel back (Recoil)


            if (transform.localPosition == finalPos)//If the barrel is in the final of the course
            {
                currentLerpTime2 += Time.deltaTime;

               
                if (currentLerpTime2 >= travelTime_back)
                {

                    currentLerpTime2 = travelTime_back;
                }

                float perc2 = currentLerpTime2 / travelTime_back;
                transform.localPosition = Vector3.Lerp(finalPos, initPos, perc2);//This put the barrel in the initial position

                print("posicao final eh:" + finalPos);

                if (transform.localPosition == initPos)
                {
                    print("posicao de volta eh:" + initPos);
                    keyHit = 0;

                }
                
            }

        }


    }
   
    


}

Solved:

adding currentLerpTime = 0;
currentLerpTime2 = 0;

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Tiro : MonoBehaviour {

    private Vector3 initPos = new Vector3(0.017f, -1.6f, 0);
    private Vector3 finalPos = new Vector3(0.017f, -1f, 0);
    private float distance  = 0.6f;
    private float distance2 = 0;
    private float travelTime = 0.1f;
    private float travelTime_back = 1f;
    public float currentLerpTime;
    public float currentLerpTime2;
    public float keyHit = 0;
    
    private Vector3 backPos;

    // Use this for initialization
    void Start (){

      //  initPos = transform.localPosition = new Vector3 (0.017f,-1.6f,0);
       // finalPos = transform.localPosition = new Vector3(0.017f, -1f, 0); 
       // backPos = transform.localPosition + Vector3.down * distance2;
       
    }
    

    // Update is called once per frame
    void Update() {
        

        if (Input.GetKeyDown(KeyCode.F) && keyHit == 0 && transform.localPosition == initPos)
        {
           
            keyHit = 1;
          

        }
       

        if (keyHit == 1)
        {
            currentLerpTime += Time.deltaTime;

            if (currentLerpTime >= travelTime)
            {

                currentLerpTime = travelTime;
            }

            float perc = currentLerpTime / travelTime;
            transform.localPosition = Vector3.Lerp(initPos , finalPos, perc);//This put the barrel back (Recoil)


            if (transform.localPosition == finalPos)//If the barrel is in the final of the course
            {
                currentLerpTime2 += Time.deltaTime;

               
                if (currentLerpTime2 >= travelTime_back)
                {

                    currentLerpTime2 = travelTime_back;
                }

                float perc2 = currentLerpTime2 / travelTime_back;
                transform.localPosition = Vector3.Lerp(finalPos, initPos, perc2);//This put the barrel in the initial position

                print("posicao final eh:" + finalPos);

                if (transform.localPosition == initPos)
                {
                    print("posicao de volta eh:" + initPos);
                    keyHit = 0;
                    currentLerpTime = 0;
                    currentLerpTime2 = 0;

                }
                
            }

        }


    }
   
    


}