Electrenator / Tabbly

A program for showing your browser tab usage within Discord's rich presence and to log that usage.
GNU General Public License v3.0
3 stars 0 forks source link

Auto startup on boot #27

Open Electrenator opened 1 year ago

Electrenator commented 1 year ago

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 commented 1 year ago

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

Electrenator commented 6 months ago

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