Last active
May 11, 2016 14:33
-
-
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%
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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