Skip to content
Snippets Groups Projects
Commit cb74b5b5 authored by Dylan Wheeler's avatar Dylan Wheeler
Browse files

feat: remove unnecessary variable and update script to check for any flag/input

parent 949278ca
No related branches found
No related tags found
1 merge request!158FEAT: introduce shell script to allow user to disable another users crontab...
#!/bin/bash
username="$1"
usage() {
echo "Usage: $0 -d USERNAME to disable a user"
echo "Usage: $0 -e USERNAME to re-enable a user"
......@@ -12,10 +10,10 @@ if [[ "$EUID" -ne 0 ]]; then
exit 1
fi
if [ -z "$username" ]; then
usage
exit1
fi
if [ "$#" -eq 0 ]; then
usage
exit 1
fi
while getopts ':d:e:' OPTION; do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment