Remove expectation for an argument to be passed

Added in a failing return value to flush out tests/scripts that may be calling this script multiple times with various arguments
This commit is contained in:
Andras Fekete
2023-03-27 13:30:12 -04:00
parent e0e590f126
commit cadd2d9ab6

View File

@ -858,24 +858,11 @@ run_renewcerts(){
#start in root.
cd ../ || exit 1
#if there was an argument given, check it for validity or print out error
if [ ! -z "$1" ]; then
#valid argument print out other valid arguments
if [ "$1" == "-h" ] || [ "$1" == "-help" ]; then
echo ""
echo "\"no argument\" will attempt to update all certificates"
echo "-h or -help display this menu"
echo ""
echo ""
#else the argument was invalid, tell user to use -h or -help
else
echo ""
echo "That is not a valid option."
echo ""
echo "use -h or -help for a list of available options."
echo ""
echo "No arguments expected"
exit 1
fi
else
echo "Saving the configure state"
echo ""
cp config.status tmp.status || exit 1
@ -894,6 +881,4 @@ else
restore_config
check_result $? "restoring old configuration"
fi #END already defined
exit 0