Switch to different zip/pwgen exists bash check
This commit is contained in:
@@ -58,17 +58,19 @@ if [ ! -d "${root_folder}${output_zip_folder}" ]; then
|
|||||||
mkdir "${root_folder}${output_zip_folder}";
|
mkdir "${root_folder}${output_zip_folder}";
|
||||||
fi;
|
fi;
|
||||||
# check if password generate software is installed
|
# check if password generate software is installed
|
||||||
if [ ! command -v pwgen &> /dev/null ]; then
|
# if [ ! command -v pwgen &> /dev/null ]; then
|
||||||
|
if [ -z $(command -v pwgen) ]; then
|
||||||
echo "Missing pwgen application, aborting";
|
echo "Missing pwgen application, aborting";
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
# check for zip
|
# check for zip
|
||||||
if [ ! command -v zip &> /dev/null ]; then
|
# if [ ! command -v zip &> /dev/null ]; then
|
||||||
|
if [ -z $(command -v zip) ]; then
|
||||||
echo "Missing zip application, aborting";
|
echo "Missing zip application, aborting";
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
# check if sshallow group exists
|
# check if sshallow group exists
|
||||||
if [ -z $(cat /etc/group|grep "${ssh_group}:") ]; then
|
if [ -z $(cat /etc/group | grep "${ssh_group}:") ]; then
|
||||||
echo "Missing ssh access group: ${ssh_group}";
|
echo "Missing ssh access group: ${ssh_group}";
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
|
|||||||
Reference in New Issue
Block a user