#!/bin/bash

################################################################################
# Filename:      pearl-webserver-toggle
# Purpose:       toggle the Apache2 webserver on/off from the desktop
# Authors:       Scott Vandergrift of Pearl Linux
# Latest change: Sun June 28, 2026.
################################################################################

bash -c "if systemctl is-active --quiet apache2; then sudo systemctl stop apache2; echo 'Apache Stopped!'; else sudo systemctl start apache2; echo 'Apache Started!'; fi; sleep 2"

sleep 1
exit
