Skip to content

Instantly share code, notes, and snippets.

View stephdl's full-sized avatar
🏠
Happy to live in Aveyron

Stephane de Labrusse stephdl

🏠
Happy to live in Aveyron
View GitHub Profile

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@stephdl
stephdl / gist:d63de6b76b8294948782
Created August 18, 2015 17:40
/etc/rkhunter.conf
#
# This is the main configuration file for Rootkit Hunter.
#
# You can modify this file directly, or you can create a local configuration
# file. The local file must be named 'rkhunter.conf.local', and must reside
# in the same directory as this file. Alternatively you can create a directory,
# named 'rkhunter.d', which also must be in the same directory as this
# configuration file. Within the 'rkhunter.d' directory you can place further
# configuration files. There is no restriction on the file names used, other
# than they must end in '.conf'.
--- /etc/rkhunter.conf 2015-08-18 20:01:54.966464648 +0200
+++ /etc/rkhunter.conf.original 2015-08-18 19:57:55.497170630 +0200
@@ -1,171 +1,317 @@
-#------------------------------------------------------------
-# !!DO NOT MODIFY THIS FILE!!
-#
-# Manual changes will be lost when this file is regenerated.
-#
-# Please read the developer's guide, which is available
-# at http://www.contribs.org/development/
Sep 7 15:37:11 sme9dev3 esmith::event[6516]: WARNING in /etc/e-smith/templates//etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf: Use of uninitialized value $esmith::__TEMPLATE__::1::ExternalIP in concatenation (.) or string at /etc/e-smith/templates//etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf line 192.
Sep 7 15:37:11 sme9dev3 esmith::event[6516]: WARNING in /etc/e-smith/templates//etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf: Use of uninitialized value $esmith::__TEMPLATE__::1::ExternalIP in substitution (s///) at /etc/e-smith/templates//etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf line 219.
Sep 7 15:37:11 sme9dev3 esmith::event[6516]: WARNING in /etc/e-smith/templates//etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf: Use of uninitialized value $esmith::__TEMPLATE__::1::ExternalIP in concatenation (.) or string at /etc/e-smith/templates//etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.co
@stephdl
stephdl / gist:a0bfdfa522753774a14c
Created October 18, 2015 19:20
shellinabox sysvinit
[root@nethserver-dev ~]# cat /etc/init.d/shellinaboxd
#!/bin/sh
#
# shellinaboxd Takes care of starting and stopping shellinabox.
#
# chkconfig: - 80 20
# description: Publish command line shell through AJAX interface.
### BEGIN INIT INFO
# Required-Start: $local_fs $network
lsd@leo:~$ ssh root@sme9dev64-7
The authenticity of host 'sme9dev64-7 (192.168.12.246)' can't be established.
RSA key fingerprint is SHA256:MqEYZbEm7IlDK3HNjyKXx6injPSNO3MBa3sIy4YblRI.
RSA key fingerprint is MD5:23:e4:47:bb:10:6c:a9:1c:7c:40:89:bb:7a:9e:6d:10.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'sme9dev64-7,192.168.12.246' (RSA) to the list of known hosts.
Last login: Mon Jul 25 22:36:42 2016
************ Welcome to SME Server 9.1 *************
Before editing configuration files, familiarise
Nov 22 15:52:01 NS7DEV2 /sbin/e-smith/db[2249]: /var/lib/nethserver/db/configuration: OLD nsdc=service|IpAddress|192.168.12.78|bridge||status|disabled
Nov 22 15:52:01 NS7DEV2 /sbin/e-smith/db[2249]: /var/lib/nethserver/db/configuration: NEW nsdc=service|IpAddress|192.168.12.78|bridge||status|enabled
Nov 22 15:52:02 NS7DEV2 esmith::event[2254]: Event: nethserver-dc-save
Nov 22 15:52:09 NS7DEV2 esmith::event[2254]: Loaded plugins: changelog, fastestmirror, nethserver_events
Nov 22 15:52:09 NS7DEV2 esmith::event[2254]: Examining /usr/lib/nethserver-dc/ns-samba-1.0.0-1.ns7.x86_64.rpm: ns-samba-1.0.0-1.ns7.x86_64
Nov 22 15:52:09 NS7DEV2 esmith::event[2254]: Marking /usr/lib/nethserver-dc/ns-samba-1.0.0-1.ns7.x86_64.rpm to be installed
Nov 22 15:52:09 NS7DEV2 esmith::event[2254]: Determining fastest mirrors
Nov 22 15:52:09 NS7DEV2 esmith::event[2254]: * base: centos.quelquesmots.fr
Nov 22 15:52:09 NS7DEV2 esmith::event[2254]: * epel: mirrors.ircam.fr
Nov 22 15:52:09 NS7DEV2 esmith::event[2254]: * extras: mirrors.ir
Dec 1 16:04:05 NS7DEV4 slapd[2425]: daemon: shutdown requested and initiated.
Dec 1 16:04:05 NS7DEV4 slapd[2425]: slapd shutdown: waiting for 0 operations/tasks to finish
Dec 1 16:04:05 NS7DEV4 slapd[2425]: slapd stopped.
Dec 1 16:04:05 NS7DEV4 slapd[3537]: @(#) $OpenLDAP: slapd 2.4.40 (Mar 31 2016 15:24:52) $#012#011mockbuild@worker1.bsys.centos.org:/builddir/build/BUILD/openldap-2.4.40/openldap-2.4.40/servers/slapd
Dec 1 16:04:05 NS7DEV4 slapd[3539]: hdb_db_open: warning - no DB_CONFIG file found in directory /var/lib/ldap: (2).#012Expect poor performance for suffix "dc=directory,dc=nh".
Dec 1 16:04:05 NS7DEV4 slapd[3539]: slapd starting
Dec 1 16:04:05 NS7DEV4 slapd[3539]: conn=1000 fd=11 ACCEPT from PATH=/var/run/ldapi (PATH=/var/run/ldapi)
Dec 1 16:04:05 NS7DEV4 slapd[3539]: conn=1000 op=0 BIND dn="" method=163
Dec 1 16:04:05 NS7DEV4 slapd[3539]: conn=1000 op=0 BIND authcid="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" authzid="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth"