Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
#!/usr/bin/python | |
import requests | |
import lxml.html | |
import ConfigParser | |
import os | |
import sys | |
from collections import defaultdict | |
from itertools import groupby | |
class WarcraftLogs(object): |
#include <stdio.h> | |
#include <unistd.h> | |
#include <stdbool.h> | |
#include <tevent.h> | |
#include <talloc.h> | |
#include <param.h> | |
#include <ldb.h> | |
#include <dcerpc.h> | |
#include <samba/session.h> |
#! perl -slw | |
use strict; | |
( my $input = do{ local $/; <DATA> } ) =~ tr[\n][]d; | |
my $tab = 0; | |
$input =~ s[([()])]{ | |
$tab-- if $1 eq ')'; | |
my $modified = "\n" . ( " " x $tab ) . $1; | |
$tab++ if $1 eq '('; |
#!/bin/bash | |
cat $1 | grep -v auth_check_password_send | grep -v imessaging | grep -v single_terminate | grep -v tstream_read_pdu_blob_recv | grep -v authsam_account_ok | grep -v sam_ignoredomain | grep -v ldb_request | grep -v ldb_wrap | grep -v logon_hours | grep -v housekeeping | grep -v stream_terminate_connection | less |
#!/usr/bin/perl | |
# Copyright (C) 2014 Zentyal S.L. | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License, version 2, as | |
# published by the Free Software Foundation. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
lockfile=/var/tmp/mylock | |
if ( set -o noclobber; echo "$$" > "$lockfile") 2> /dev/null; then | |
trap 'rm -f "$lockfile"; exit $?' INT TERM EXIT | |
# do stuff here | |
# clean up after yourself, and release your trap | |
rm -f "$lockfile" |
#!/usr/bin/env python | |
import smtplib | |
import argparse | |
parser = argparse.ArgumentParser(description='Send massive emails') | |
parser.add_argument('to_addr_list', metavar='TO', type=str, nargs='+', | |
help='List of addresses to send the emails') | |
parser.add_argument('--number', '-n', type=int, default=100, | |
help='Number of emails to send)') | |
parser.add_argument('--username', '-u', help='SMTP login') |
mysqladmin --defaults-file=/etc/mysql/debian.cnf --force drop openchange create openchange && \ | |
openchange_provision --openchangedb --openchangedb-uri=`cat /etc/samba/openchange.conf | grep mysql:// | head -n 1 | awk '{ print $3 }'` --firstorg="`/usr/share/zentyal/grep-redis openchange/state | cut -c 19- | ruby -rjson -e 'puts JSON.parse(ARGF.read)["Provision"]["organizationname"]'`" |
socat -v UNIX-LISTEN:/tmp/socat-listen UNIX-CONNECT:/path/to/real.socket |