Open Electrenator opened 1 year ago
Thought about doing this with a systemd user process but could probably do it much easier with crontab's @reboot
Currently just doing this by doing @reboot cd [project_dir]; bash autostart.sh
in the crontab. Been doing this for a while now. Don't currently want to integrate this into the program itself but it probably woudn't be too hard to do, given the project doesn't change locations.
Autostart.sh file I currently use includes;
#!/bin/bash
# Add to cron useing 'cd [project path]; bash autostart.sh'
python -m venv venv &&
source venv/bin/activate &&
(
until pip install -r requirements.txt;
do # untill successfull execution / dependancy download
echo -e "\nRetrying dependancy install in 1 minute...\n";
sleep 60;
done;
python src/main.py --verbose
) &>> log/crontab-$(hostname).log;
deactivate
Allowing automatic startup on boot. This would allow Tabbly to start when a user logs in, so I can not forget to start it. Hapens far to often that I forget to start tabbly.
An user should know that tabbly has started each time it does within the background. Some system message could be used for that.