21
rated 0 times
[
21]
[
0]
/ answers: 1 / hits: 71092
/ 1 Year ago, mon, march 20, 2023, 12:04:42
Is there an idiomatic way in Ubuntu to run a script only the first time a machine is booted? (EC2).
More From » boot
Is there an idiomatic way in Ubuntu to run a script only the first time a machine is booted? (EC2).
No. But you might want to place your script in /etc/init.d/script
, and self-delete it:
#!/bin/bash
echo "Bump! I'm your first-boot script."
# Delete self
rm "${0}"