Hi,
I have 4 years of Python coding experience.
I can write a script in python to do what you want.
For the restart though , the script would require to run with root rights.
For the integrity we can run a md5 , but do we have a value to compare it with?
Let me know if i can help on this.
Thanks,
Bogdan