Skip to content

Instantly share code, notes, and snippets.

@kbrnsr
kbrnsr / dropbox
Last active December 30, 2016 23:08
Retooled dropbox init file to work with dropbox systemd systemunit file. Should be in /bin as /bin/dropbox with permission 755, see my unit file here: https://gist.github.com/kbrnsr/3984a0b45dcce5430d01
#!/bin/sh
# To configure, add line with DROPBOX_USERS="user1 user2" to /etc/sysconfig/dropbox
# Probably should use a dropbox group in /etc/groups instead.
# Source function library.
. /etc/rc.d/init.d/functions
prog=dropboxd
lockfile=${LOCKFILE-/var/lock/subsys/$prog}
@kbrnsr
kbrnsr / dropbox.service
Last active January 9, 2022 15:24
Systemd unit file for dropbox, works with CentOS 7, should be in /etc/systemd/system/ as /etc/systemd/system/dropbox.service and permission 755, for the script fiile for starting and stopping dropbox see me gist here: https://gist.github.com/kbrnsr/571f0bdb865e8fb1d846
[Unit]
Description=Dropbox is a filesyncing sevice provided by dropbox.com. This service starts up the dropbox daemon.
After=network.target syslog.target
[Service]
Environment=LC_ALL=en_US.UTF-8
Environment=LANG=en_US.UTF-8
EnvironmentFile=-/etc/sysconfig/dropbox
ExecStart=/bin/dropbox start
ExecReload=/bin/dropbox restart
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does
import hudson.model.*;
import hudson.util.*;
import jenkins.model.*;
import hudson.FilePath.FileCallable;
import hudson.slaves.OfflineCause;
import hudson.node_monitors.*;
for (node in Jenkins.instance.nodes) {
#!/bin/bash
# Created Fri Mar 22 2014
# This is an indirect fork of https://gist.github.com/SeonghoonKim/4378896
# Most of it was reworked from http://blog.basefarm.com/blog/how-to-install-logstash-with-kibana-interface-on-rhel/
# This script will download, install and start
# the following items on CentOS 6.5:
# Logstash server 1.4.0
#
# This script should be safe to run more than one time. YMMV
APP_ROOT="/opt"