Enhanced output with new features of sequencer
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
# - mysql.sh (soft; Missing informational output)
|
||||
|
||||
toolName="nextcloud"
|
||||
localOcc=("echo" "occ not found!")
|
||||
|
||||
# Get script working directory
|
||||
# (when called from a different directory)
|
||||
@@ -18,6 +19,7 @@ step_config() {
|
||||
if [ $? -eq 0 ] ; then
|
||||
CONFIG=1
|
||||
fi
|
||||
localOcc=( sudo -u www-data php "$(escpath "$NC_INSTALL_DIR/occ")" )
|
||||
}
|
||||
|
||||
step_20_info() { echo "Upgrade $toolName on command line to latest version of selected release channel"; }
|
||||
@@ -32,10 +34,21 @@ step_20() {
|
||||
}
|
||||
ncInstaller="updater/updater.phar"
|
||||
|
||||
step_100_info() { echoinfoArgs "<NC DATABASE> <IPV4 ADDRESS>"; echo "Delete IP from bruteforce table"; }
|
||||
step_100_alias() { ALIAS="bruteforceRemoveIP"; }
|
||||
step_100_info() {
|
||||
echoinfoArgs "[OCC ARGS]"
|
||||
echo "Execute occ command"
|
||||
}
|
||||
step_100_alias() { ALIAS="occ"; }
|
||||
step_100() {
|
||||
shift
|
||||
|
||||
exe "${localOcc[@]}" "$@"
|
||||
}
|
||||
|
||||
step_102_info() { echoinfoArgs "<NC DATABASE> <IPV4 ADDRESS>"; echo "Delete IP from bruteforce table"; }
|
||||
step_102_alias() { ALIAS="bruteforceRemoveIP"; }
|
||||
step_102() {
|
||||
shift
|
||||
local ncdb=
|
||||
local ip=
|
||||
local ipregex='^[0-2]*[0-9]{1,2}\.[0-2]*[0-9]{1,2}\.[0-2]*[0-9]{1,2}\.[0-2]*[0-9]{1,2}$'
|
||||
@@ -62,33 +75,44 @@ step_100() {
|
||||
endReturn -o $? "Error deleting ip $ip"
|
||||
}
|
||||
|
||||
step_102_info() { echoinfoArgs "<USER>"; echo "Reset and rescan the music library in the background for one user"; }
|
||||
step_102_alias() { ALIAS="audioreset"; }
|
||||
step_102() {
|
||||
step_104_info() { echoinfoArgs "<USER>"; echo "Reset and rescan the music library in the background for one user"; }
|
||||
step_104_alias() { ALIAS="audioreset"; }
|
||||
step_104() {
|
||||
shift
|
||||
local ncUser=$1
|
||||
local lOcc="sudo -u www-data php $NC_INSTALL_DIR/occ"
|
||||
|
||||
if [ -z "$ncUser" ] ; then
|
||||
echoerr " [E] Reset only for single user"
|
||||
return 1
|
||||
fi
|
||||
|
||||
exep "sudo -u www-data php \"$NC_INSTALL_DIR/occ\" audioplayer:reset $ncUser > /var/log/ncAudioRescan.log"
|
||||
exep "${localOcc[@]} audioplayer:reset $ncUser > /var/log/ncAudioRescan.log"
|
||||
echoseq " [I] Rescan audioplayer database for user $ncUser"
|
||||
exep "sudo -u www-data php \"$NC_INSTALL_DIR/occ\" audioplayer:scan -vvvv $ncUser >> /var/log/ncAudioRescan.log &"
|
||||
exep "${localOcc[@]} audioplayer:scan -vvvv $ncUser >> /var/log/ncAudioRescan.log &"
|
||||
}
|
||||
|
||||
step_104_info() { echo "Reset picture preview folder"; }
|
||||
step_104_alias() { ALIAS="resetpreview"; }
|
||||
step_104() {
|
||||
local lOcc="sudo -u www-data php \"$NC_INSTALL_DIR/occ\""
|
||||
step_106_info() { echoinfoArgs "<USER>"; echo "Scan the music library"; }
|
||||
step_106_alias() { ALIAS="audioscan"; }
|
||||
step_106() {
|
||||
shift
|
||||
local ncUser=$1
|
||||
|
||||
if [ -z "$ncUser" ] ; then
|
||||
echoerr " [E] Reset only for single user"
|
||||
return 1
|
||||
fi
|
||||
|
||||
exe "${localOcc[@]}" audioplayer:scan -vvvv $ncUser
|
||||
}
|
||||
|
||||
step_110_info() { echo "Reset picture preview folder"; }
|
||||
step_110_alias() { ALIAS="resetpreview"; }
|
||||
step_110() {
|
||||
if [ -e "${NC_DATA_DIR}" ]; then
|
||||
exe rm -rf "${NC_DATA_DIR}/appdata_"*"/preview/"*
|
||||
|
||||
echoseq " [I] Rescan app data folder"
|
||||
exep "$lOcc files:scan-app-data &"
|
||||
exep "${localOcc[@]} files:scan-app-data &"
|
||||
else
|
||||
echoerr " [E] Nextcloud data direcotry $NC_DATA_DIR not found"
|
||||
return 1
|
||||
@@ -113,5 +137,5 @@ occ config:app:set preview jpeg_quality --value="60"
|
||||
NOTES_END
|
||||
}
|
||||
|
||||
VERSION_SEQREV=14
|
||||
VERSION_SEQREV=15
|
||||
. /usr/local/bin/sequencer.sh
|
||||
|
Reference in New Issue
Block a user