Unix startup script
Build your unix script:
vim /home/user_name/unix_script/python_script.sh
vim /home/user_name/unix_script/python_script.sh
python_script.sh:
#!/bin/bash
echo "get python version"
python3 --version
#!/bin/bash
echo "get python version"
python3 --version
Build the service to run the script:
vim /lib/systemd/system/startup.service startup.service
vim /lib/systemd/system/startup.service
startup.service:
[Unit]
Description=Startup Script
[Service]
ExecStart=/bin/bash "/home/user_name/unix_script/python_script.sh"
[Install]
WantedBy=multi-user.target
[Unit]
Description=Startup Script
[Service]
ExecStart=/bin/bash "/home/user_name/unix_script/python_script.sh"
[Install]
WantedBy=multi-user.target
Enable the service and build the symlink:
systemctl enable startup.service --now
systemctl enable startup.service --now