28 lines
651 B
Plaintext
28 lines
651 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||
|
#
|
||
|
# SPDX-FileCopyrightText: 2023 PeppemrintOS Team (peppermintosteam@proton.me)
|
||
|
|
||
|
# List of services to be enabled
|
||
|
services=("nftables" "cockpit" "ssh" "sshguard" "apache2")
|
||
|
|
||
|
# Loop to enable each service
|
||
|
for service in "${services[@]}"; do
|
||
|
# Check if the service is already enabled
|
||
|
if systemctl is-enabled "$service" >/dev/null 2>&1; then
|
||
|
echo "Service $service is already enabled."
|
||
|
else
|
||
|
# Enable the service
|
||
|
systemctl enable "$service"
|
||
|
echo "Service $service has been successfully enabled."
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
# Reload the services
|
||
|
systemctl daemon-reload
|
||
|
|
||
|
echo "Completed."
|
||
|
|
||
|
|