A program to easily make any script startup on Linux.
The program does this things:
- Locate your needed script (that you wanna be startup)
- Ask you if you want to move this script to other directory
- Check if everything is ok
- Move this script to other directory (if you want to)
- Make it executable
- Create and edit service file
- Reload daemon
- Enable service file that will execute your script at startup
Type the following commands in your terminal
git clone https://github.com/1RaY-1/linux-startup
cd linux-startup
And run it
sudo bash makeit-startup.sh
Or install it and then run
sudo bash install.sh
sudo makeit-startup
If you just downloaded this program.
sudo bash makeit-startup.sh
If you installed it.
sudo makeit-startup
Then you simply have to do few things.
-
Enter full path to the script that you wanna make startup.
-
Decide if you want to move it to other directory or not.
-
Agree to continue.
You can watch example video, to see that it's very easy to use it.
You can encounter problems.
To check if you have some problems with this script or not, you can try making script test.py or test.sh startup.
So
- If after typing:
systemctl status YOUR-SERVICE-FILE
You recive an error which is saying something like: Permissions denied, then you probably need to edit /etc/selinux/config and change line:
SELINUX=enforcing
with
SELINUX=permissive
And reboot your system
- If you recive an error which is saying that you have a bad Unit file, you can edit your service file and try changing: [Unit] with [UNIT] or with [unit]
If you encounter more problems, please tell me by creating an issue.
- Before making any script startup, make sure you added a shebang in there.
- Your startup script will execute commands as superuser.
- If you wanna understand how to manually make any script startup, here some links that will help you:
https://stackoverflow.com/questions/12973777/how-to-run-a-shell-script-at-startup