Add enabled check for when pymc_repeater is installed by default but not enabled (femtofox)

This commit is contained in:
theshaun
2026-02-01 16:58:04 +10:00
parent a7a3532e1b
commit d54269fbc5

View File

@@ -70,6 +70,11 @@ is_running() {
systemctl is-active "$SERVICE_NAME" >/dev/null 2>&1
}
# Function to check if service is enabled
is_enabled() {
systemctl is-enabled "$SERVICE_NAME" >/dev/null 2>&1
}
# Function to get current version
get_version() {
# Try to read from _version.py first (generated by setuptools_scm)
@@ -638,6 +643,9 @@ manage_service() {
case $action in
"start")
if ! is_enabled; then
systemctl enable "$SERVICE_NAME"
fi
systemctl start "$SERVICE_NAME"
if is_running; then
show_info "Service Started" "\n✓ pyMC Repeater service has been started successfully."