This file contains hidden or 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 | |
# | |
# cpu-speed: | |
# Requirements - be the root user, FreeBSD 9.2 or higher. | |
# | |
# Get or set the CPU frequency. This command with no arguments will | |
# print the current CPU frequency. CPU may be idling at it's lowest speed. | |
# | |
# This command takes 1 optional argument - new MAX cpu freq (in Mhz). | |
# expressed as an integer number. e.g. "cpu 800" - set max freq 800 Mhz. |
This file contains hidden or 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
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import logging | |
import subprocess | |
import shutil | |
import tarfile | |
import tempfile | |
import argparse |
This file contains hidden or 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
#!/usr/bin/env python | |
import sys, os, time, atexit | |
from signal import SIGTERM | |
class Daemon: | |
""" | |
A generic daemon class. | |
Usage: subclass the Daemon class and override the run() method |