Corrections to control file
@@ -196,29 +196,24 @@ restart_service() {
restart_sshd() {
for svc in "ssh" "sshd"; do
restart_service "${svc}"
- [ $? -eq 0 ] && return 0
done
}
restart_nscd() {
for svc in "nscd" "unscd"; do
restart_service "${svc}"
- [ $? -eq 0 ] && return 0
done
}
setup_sudoers() {
- for dir in "${sudoers_dir}" "${users_dir}"; do
- mkdir -p "${dir}"
- chmod 750 "${dir}"
- done
+ mkdir -p "${sudoers_dir}"
+ chmod 750 "${sudoers_dir}"
echo "#includedir ${sudoers_dir}" > "${sudoers_file}"
}
remove_sudoers() {
rm -f "${sudoers_file}"
rm -rf "${sudoers_dir}"
- rm -rf "${users_dir}"
}
restore_config() {
@@ -295,6 +290,10 @@ while [ $# -gt 0 ]; do
action="deactivate"
shift
;;
+ status)
+ action="status"
+ shift
+ ;;
*)
shift
;;
