Exec Guardian
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
execguard/startExecguard.sh

23 lines
722 B

#!/bin/bash
# Copyright (c) 2025 Robert Strutts <bobs@NewToFaith.com>
# License: MIT
# GIT: https://git.mysnippetsofcode.com/bobs/execguard
if [ -z "$1" ]; then
/usr/bin/echo "Which mode to start: init or enforce?"
exit 1
fi
if [ "$1" == "init" ]; then
/usr/bin/echo "Stopping enforce and Starting init mode."
/usr/bin/sudo /usr/bin/systemctl stop execguard@enforce
/usr/bin/sudo /usr/bin/systemctl start execguard@init
elif [ "$1" == "enforce" ]; then
/usr/bin/echo "Stopping init and Starting enforce mode."
/usr/bin/sudo /usr/bin/systemctl stop execguard@init
/usr/bin/sudo /usr/bin/systemctl start execguard@enforce
else
/usr/bin/echo "Invaild option... use init or enforce."
fi