You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This piece of code would update the crontab for everyone using the SMB mount app. Problem is that it's not fail proof to get the actual MOUNT_IDs so it's better to do it manually.
source /var/scripts/fetch_lib.sh
# Replace iNotify checker with a script instead
if crontab -u www-data -l | grep -q "files_external:notify -v"
then
download_script ADDONS notify-crontab
chmod +x "$SCRIPTS"/notify-crontab.sh
chown root:root "$SCRIPTS"/notify-crontab.sh
MOUNT_ID=$(sudo -u postgres psql nextcloud_db -c "select mount_id from oc_external_config")
crontab -u www-data -l | grep -v "files_external:notify -v" | crontab -u www-data -
crontab -u root -l | { cat; echo "@reboot $SCRIPTS/notify-crontab.sh $(echo "${MOUNT_ID##* }" | head -1)"; } | crontab -u root -
print_text_in_color "$ICyan" "Replaced iNotify with a script instead of command."
fi
The text was updated successfully, but these errors were encountered:
This piece of code would update the crontab for everyone using the SMB mount app. Problem is that it's not fail proof to get the actual
MOUNT_ID
s so it's better to do it manually.The text was updated successfully, but these errors were encountered: