Skip to content

Commit

Permalink
added database dir to ncp-info (#553)
Browse files Browse the repository at this point in the history
  • Loading branch information
kanuahs authored and nachoparker committed Jun 26, 2018
1 parent fe12ff9 commit f1cc627
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/ncp-diag
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ SWP="$( swapon | tail -1 | awk '{ print $1 }' )"
[[ "$SWP" == "" ]] && SWP="none"
echo "swapfile|$SWP"

# Database
DBDIR=$( grep datadir /etc/mysql/mariadb.conf.d/50-server.cnf | awk -F "= " '{ print $2 }' )
test -d "$DBDIR" || DBDIRINFO=" (doesn't exist)"
echo "dbdir|$DBDIR$DBDIRINFO"

# Nextcloud
[[ ${EUID} -eq 0 ]] && SUDO="sudo -u www-data"
VERSION="$( $SUDO php /var/www/nextcloud/occ status | grep "version:" | awk '{ print $3 }' )"
Expand Down

0 comments on commit f1cc627

Please sign in to comment.