Skip to content

Instantly share code, notes, and snippets.

@richhollis
Last active May 11, 2016 14:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save richhollis/e2095e419408caf63822 to your computer and use it in GitHub Desktop.
Save richhollis/e2095e419408caf63822 to your computer and use it in GitHub Desktop.
Shell script for monit to launch dropbox daemon with ionice idle priority and cpu limit 20%
check process dropbox with pidfile /home/username/.dropbox/dropbox.pid
start program = "/home/username/.dropbox-dist/dropboxd-nice"
as uid username and gid username
stop program = "bin/bash -c '/bin/kill -9 `cat /home/username/.dropbox/dropbox.pid`'"
as uid username and gid username
#!/bin/sh
ionice -c 3 /home/username/.dropbox-dist/dropboxd &
sleep 4
cpulimit -b -e dropbox -l 20 -z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment