1
0
Fork 0

Fix pwgen install

This commit is contained in:
VirtuBox 2020-04-24 15:57:51 +02:00
parent 0171228e0f
commit 97b754bbb3
Signed by: virtubox
GPG Key ID: 22EB296C97BAD476
2 changed files with 42 additions and 4 deletions

39
.gitattributes vendored Normal file
View File

@ -0,0 +1,39 @@
# Auto detect text files and perform LF normalization
* text=auto
# Documents
*.md text eol=lf
*.tex text diff=tex
*.adoc text
*.textile text
*.mustache text eol=lf
*.csv text
*.tab text
*.tsv text
*.txt text
*.sql text
# Scripts
*.bash text eol=lf
*.fish text eol=lf
*.sh text eol=lf
# Source files
# ============
*.pxd text diff=python
*.py text diff=python
*.py3 text diff=python
*.pyc text diff=python
*.pyd text diff=python
*.pyo text diff=python
*.pyw text diff=python
*.pyx text diff=python
*.pyz text diff=python
#
# Exclude files from exporting
#
.gitattributes export-ignore
.gitignore export-ignore

View File

@ -8,7 +8,7 @@ else
fi
if [ "$(id -u)" != "0" ]; then
IS_SUDOERS=$(groups | grep sudo)
IS_SUDOERS=$(groups | grep -q sudo)
if [ -n "$(command -v sudo)" ] && [ -n "$IS_SUDOERS" ]; then
NEED_SUDO="$(command -v sudo)"
else
@ -37,7 +37,7 @@ _run() {
}
apt_install() {
DEBIAN_FRONTEND=noninteractive apt-get install --option=Dpkg::options::=--force-confmiss --option=Dpkg::options::=--force-confold "$@" --assume-yes /dev/null 2>&1
DEBIAN_FRONTEND=noninteractive apt-get install --option=Dpkg::options::=--force-confmiss --option=Dpkg::options::=--force-confold "$@" --assume-yes >/dev/null 2>&1
}
transfer_vtbox_net() {
@ -498,7 +498,7 @@ _FTP_ADD() {
echo "Usage : ftpadd <user> <domain>"
else
if ! command_exists pwgen; then
$NEED_SUDO apt-get install pwgen -y > /dev/null 2>&1
$NEED_SUDO apt-get install pwgen -y >/dev/null 2>&1
fi
if [ -d /var/www/"$2"/htdocs ]; then
ftpaccountpass=$(_PWGEN)
@ -699,7 +699,6 @@ _DELETE_WO_SITES() {
done
}
_STABILISE_VIDEO() {
for i in "$PWD"/*; do