ViChyavIn
ViChyavIn

Reputation: 63

How to exit a bash script after it starts a Python process?

I have a Python program that can update itself from a GitHub repository. When I activate the updating process, the Python script runs updater.bash script and kills itself. The bash script updates the program and then runs it again. But it keeps running despite I put exit 0 in the end of the updater. So, every update creates another bash script that eats more resources.

How can I kill the script after it runs the Python script?

Upvotes: 1

Views: 290

Answers (1)

Cyrus
Cyrus

Reputation: 88583

exec python ... to replace bash with python program.

See: help exec

Upvotes: 2

Related Questions