Fix install script and update .gitignore

Correct STATE_DIR to project dir, remove unnecessary pip3 check and ENV_FILE
replacement for cleaner, accurate installation.

Changes:
- Set STATE_DIR to ./state in install.sh
- Remove pip3 dependency check (included in venv)
- Remove redundant ENV_FILE sed replacement
- Update .gitignore to ignore state/ directory
This commit is contained in:
Jeena 2026-01-04 17:46:16 +09:00
parent 8433e4a442
commit cc00650bc2
4 changed files with 4 additions and 8 deletions

View file

@ -13,7 +13,7 @@ NC='\033[0m' # No Color
# Default paths
PROJECT_DIR="$(pwd)"
STATE_DIR="$HOME/.config/email_forwarder"
STATE_DIR="./state"
ENV_FILE="./.env"
# Functions
@ -23,10 +23,6 @@ check_dependencies() {
echo -e "${RED}Error: python3 not found. Please install Python 3.${NC}"
exit 1
fi
if ! command -v pip3 &> /dev/null; then
echo -e "${RED}Error: pip3 not found. Please install pip.${NC}"
exit 1
fi
if ! command -v systemctl &> /dev/null; then
echo -e "${RED}Error: systemctl not found. Systemd required.${NC}"
exit 1
@ -64,7 +60,6 @@ setup_systemd() {
# Replace placeholders
sed -i "s|/path/to/your/email_forwarder|$PROJECT_DIR|g" "$HOME/.config/systemd/user/email_forwarder.service.d/override.conf"
sed -i "s|./.env|$ENV_FILE|g" "$HOME/.config/systemd/user/email_forwarder.service.d/override.conf"
# Reload systemd
systemctl --user daemon-reload