1

I'm writing a python script on Linux (debian) to install a few things, reboot, and then do more things.

I'm not sure if it's possible, but would I be able to say,

run all of my installers, reboot and resume my script from where it left off?

I would like for the user to not have to do anything (even log onto the machine, if at all possible)

Oh! Also, is there a way to keep(or Store) variables without storing them in plaintext?

Thanks!

2
  • I would split the script into 2 scripts: one pre-boot, and one post-boot. You can have the pre-boot script add the post-boot script into the init.d folder so it will execute at boot time. Take a look at debian-administration.org/article/28/… Commented Apr 22, 2016 at 21:20
  • I figured this would be the easiest way to do it. Thanks! Commented Apr 22, 2016 at 21:34

1 Answer 1

2

One more way to execute your script at booting time by adding below line to root's crontab

@reboot /usr/bin/python /root/simple.py

simple.py -- script need to be executed.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.