Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto startup on boot #27

Open
Electrenator opened this issue Oct 16, 2022 · 2 comments
Open

Auto startup on boot #27

Electrenator opened this issue Oct 16, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@Electrenator
Copy link
Owner

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.

@Electrenator Electrenator added the enhancement New feature or request label Oct 16, 2022
@Electrenator
Copy link
Owner Author

Thought about doing this with a systemd user process but could probably do it much easier with crontab's @reboot

@Electrenator
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant