testsAndMisc/python_pkg/screen_locker/remove_systemd.sh
Krzysztof kuhy Rudnicki ead6072eee refactor: remove manual workout forms, ADB-only verification + sick mode
- Remove _workout_forms.py and all manual running/strength workout forms
- Verification is now ADB-only: phone check → verified (unlock) | failed (retry + sick mode)
- Add systemd timer (workout-locker.timer) for periodic 15min checks
- Fix service unit: add PYTHONPATH, WorkingDirectory, use -m invocation
- Update install/remove scripts for timer support
- Remove form-related constants, tests, and conftest helpers
- 127 tests, 100% branch coverage maintained
2026-03-27 15:54:01 +01:00

24 lines
668 B
Bash
Executable File

#!/bin/bash
# Remove workout locker systemd service
SERVICE_NAME="workout-locker.service"
TIMER_NAME="workout-locker.timer"
USER_SERVICE_DIR="$HOME/.config/systemd/user"
# Stop the service and timer if running
systemctl --user stop "$TIMER_NAME" 2>/dev/null
systemctl --user stop "$SERVICE_NAME" 2>/dev/null
# Disable the service and timer
systemctl --user disable "$TIMER_NAME" 2>/dev/null
systemctl --user disable "$SERVICE_NAME" 2>/dev/null
# Remove service and timer files
rm -f "$USER_SERVICE_DIR/$SERVICE_NAME"
rm -f "$USER_SERVICE_DIR/$TIMER_NAME"
# Reload systemd daemon
systemctl --user daemon-reload
echo "✓ Workout locker service and timer removed"