ajout de nouveaux fichiers de configuration du système RPI
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
dhcpcd.conf /etc/
|
||||
dnsmasq.conf /etc/
|
||||
hostapd.conf /etc/hostapd/
|
||||
hostapd /etc/default/
|
||||
logrotate.conf /etc/
|
||||
rsyslog.conf /etc/
|
||||
hostname /etc/
|
||||
hosts /etc/
|
||||
|
||||
51
kinerpisys-1.0.0/debian/kinerpisys.postinst
Normal file
51
kinerpisys-1.0.0/debian/kinerpisys.postinst
Normal file
@@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
# postinst script for sclesignrestfulmisc
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
user="root"
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
userpi="pi"
|
||||
|
||||
# Restart service
|
||||
# RSYSLOG
|
||||
ret=$(/usr/bin/systemctl is-enabled rsyslog.service)
|
||||
if [ "$ret" = "disabled" ]; then
|
||||
/usr/bin/systemctl enable rsyslog.service
|
||||
fi
|
||||
/usr/bin/systemctl restart rsyslog.service
|
||||
|
||||
# LOGROTATE
|
||||
ret=$(/usr/bin/systemctl is-enabled logrotate.service)
|
||||
if [ "$ret" = "disabled" ]; then
|
||||
/usr/bin/systemctl enable logrotate.service
|
||||
fi
|
||||
/usr/bin/systemctl restart logrotate.service
|
||||
|
||||
# DHCPCD
|
||||
ret=$(/usr/bin/systemctl is-enabled dhcpcd.service)
|
||||
if [ "$ret" = "disabled" ]; then
|
||||
/usr/bin/systemctl enable dhcpcd.service
|
||||
fi
|
||||
/usr/bin/systemctl restart dhcpcd.service
|
||||
|
||||
# DNSMASQ
|
||||
ret=$(/usr/bin/systemctl is-enabled dnsmasq.service)
|
||||
if [ "$ret" = "disabled" ]; then
|
||||
/usr/bin/systemctl enable dnsmasq.service
|
||||
fi
|
||||
/usr/bin/systemctl restart dnsmasq.service
|
||||
|
||||
# HOSTAPD
|
||||
/usr/bin/systemctl unmask hostapd.service
|
||||
ret=$(/usr/bin/systemctl is-enabled hostapd.service)
|
||||
if [ "$ret" = "disabled" ]; then
|
||||
/usr/bin/systemctl enable hostapd.service
|
||||
fi
|
||||
/usr/bin/systemctl restart hostapd.service
|
||||
@@ -1,19 +1,11 @@
|
||||
# A sample configuration for dhcpcd.
|
||||
# See dhcpcd.conf(5) for details.
|
||||
|
||||
# Allow users of this group to interact with dhcpcd via the control socket.
|
||||
#controlgroup wheel
|
||||
|
||||
# Inform the DHCP server of our hostname for DDNS.
|
||||
hostname
|
||||
|
||||
# Use the hardware address of the interface for the Client ID.
|
||||
clientid
|
||||
# or
|
||||
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
|
||||
# Some non-RFC compliant DHCP servers do not reply with this set.
|
||||
# In this case, comment out duid and enable clientid above.
|
||||
#duid
|
||||
|
||||
# Persist interface configuration when dhcpcd exits.
|
||||
persistent
|
||||
@@ -29,9 +21,6 @@ option classless_static_routes
|
||||
# Respect the network MTU. This is applied to DHCP routes.
|
||||
option interface_mtu
|
||||
|
||||
# Most distributions have NTP support.
|
||||
#option ntp_servers
|
||||
|
||||
# A ServerID is required by RFC2131.
|
||||
require dhcp_server_identifier
|
||||
|
||||
@@ -40,27 +29,14 @@ require dhcp_server_identifier
|
||||
# OR generate Stable Private IPv6 Addresses based from the DUID
|
||||
slaac private
|
||||
|
||||
# Example static IP configuration:
|
||||
# static IP configuration:
|
||||
interface eth0
|
||||
static ip_address=192.168.10.10/24
|
||||
static routers=192.168.10.1
|
||||
static domain_name_servers=192.168.10.1
|
||||
#static ip6_address=fd51:42f8:caae:d92e::ff/64
|
||||
#static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1
|
||||
|
||||
interface wlan0
|
||||
static ip_address=10.1.1.10/24
|
||||
static routers=10.1.1.1
|
||||
static domain_name_servers=10.1.1.1
|
||||
nohook wpa_supplicant
|
||||
|
||||
# It is possible to fall back to a static IP if DHCP fails:
|
||||
# define static profile
|
||||
#profile static_eth0
|
||||
#static ip_address=192.168.1.23/24
|
||||
#static routers=192.168.1.1
|
||||
#static domain_name_servers=192.168.1.1
|
||||
|
||||
# fallback to static profile on eth0
|
||||
#interface eth0
|
||||
#fallback static_eth0
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
interface=wlan0
|
||||
bind-dynamic
|
||||
dhcp-range=10.1.1.10,10.1.1.150,255.255.255.0,24h
|
||||
dhcp-range=10.1.1.11,10.1.1.150,255.255.255.0,12h
|
||||
|
||||
73
kinerpisys-1.0.0/logrotate.conf
Normal file
73
kinerpisys-1.0.0/logrotate.conf
Normal file
@@ -0,0 +1,73 @@
|
||||
# see "man logrotate" for details
|
||||
|
||||
# system-specific logs may also be configured here.
|
||||
/var/log/syslog {
|
||||
# Les logs sont compréssé avant rotation
|
||||
compress
|
||||
# compression au tour d'après
|
||||
delaycompress
|
||||
# garder 20 archives
|
||||
rotate 20
|
||||
# Fréquence de rotation hebdomadaire
|
||||
daily
|
||||
# Si la taille est supérieure à 20 Mo, déclencher la rotation
|
||||
maxsize 20M
|
||||
# Toutes les archives sont stockées dans /var/log
|
||||
olddir /var/log
|
||||
# Si le fichier est manquant, ne pas générer d'erreur et continuer
|
||||
missingok
|
||||
# On écrit la date dans le nom du fichier
|
||||
dateext
|
||||
dateformat -%Y%m%d_%H%M%S
|
||||
postrotate
|
||||
systemctl restart rsyslog > /dev/null
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/debug
|
||||
/var/log/kern.log
|
||||
/var/log/daemon.log
|
||||
/var/log/dpkg.log
|
||||
/var/log/user.log
|
||||
/var/log/messages {
|
||||
# Les logs sont compréssé avant rotation
|
||||
compress
|
||||
# compression au tour d'après
|
||||
delaycompress
|
||||
# garder 10 archives
|
||||
rotate 10
|
||||
# Fréquence de rotation mensuelle
|
||||
daily
|
||||
# Si la taille est supérieure à 20 Mo, déclencher la rotation
|
||||
maxsize 20M
|
||||
# Toutes les archives sont stockées dans /var/log
|
||||
olddir /var/log
|
||||
# Si le fichier est manquant, ne pas générer d'erreur et continuer
|
||||
missingok
|
||||
# On écrit la date dans le nom du fichier
|
||||
dateext
|
||||
dateformat -%Y%m%d_%H%M%S
|
||||
}
|
||||
|
||||
/var/log/kineintercom/Intercom.log {
|
||||
# Rotate log files set under this user and group
|
||||
# instead of using default user/group (usually root)
|
||||
su root pi
|
||||
# Les logs sont compréssé avant rotation
|
||||
compress
|
||||
# compression au tour d'après
|
||||
delaycompress
|
||||
# garder 20 archives
|
||||
rotate 30
|
||||
# Fréquence de rotation hebdomadaire
|
||||
daily
|
||||
# Si la taille est supérieure à 20 Mo, déclencher la rotation
|
||||
maxsize 20M
|
||||
# Toutes les archives sont stockées dans /var/log
|
||||
olddir /var/log/kineintercom
|
||||
# Si le fichier est manquant, ne pas générer d'erreur et continuer
|
||||
missingok
|
||||
# On écrit la date dans le nom du fichier
|
||||
dateext
|
||||
dateformat -%Y%m%d_%H%M%S
|
||||
}
|
||||
75
kinerpisys-1.0.0/rsyslog.conf
Normal file
75
kinerpisys-1.0.0/rsyslog.conf
Normal file
@@ -0,0 +1,75 @@
|
||||
# /etc/rsyslog.conf configuration file for rsyslog
|
||||
#
|
||||
# For more information install rsyslog-doc and see
|
||||
# /usr/share/doc/rsyslog-doc/html/configuration/index.html
|
||||
|
||||
|
||||
#################
|
||||
#### MODULES ####
|
||||
#################
|
||||
|
||||
module(load="imuxsock") # provides support for local system logging
|
||||
module(load="imklog") # provides kernel logging support
|
||||
#module(load="immark") # provides --MARK-- message capability
|
||||
|
||||
# provides UDP syslog reception
|
||||
#module(load="imudp")
|
||||
#input(type="imudp" port="514")
|
||||
|
||||
# provides TCP syslog reception
|
||||
#module(load="imtcp")
|
||||
#input(type="imtcp" port="514")
|
||||
|
||||
|
||||
###########################
|
||||
#### GLOBAL DIRECTIVES ####
|
||||
###########################
|
||||
|
||||
#
|
||||
# Use traditional timestamp format.
|
||||
# To enable high precision timestamps, comment out the following line.
|
||||
#
|
||||
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
|
||||
|
||||
#
|
||||
# Set the default permissions for all log files.
|
||||
#
|
||||
$FileOwner root
|
||||
$FileGroup adm
|
||||
$FileCreateMode 0640
|
||||
$DirCreateMode 0755
|
||||
$Umask 0022
|
||||
|
||||
#
|
||||
# Where to place spool and state files
|
||||
#
|
||||
$WorkDirectory /var/spool/rsyslog
|
||||
|
||||
#
|
||||
# Include all config files in /etc/rsyslog.d/
|
||||
#
|
||||
$IncludeConfig /etc/rsyslog.d/*.conf
|
||||
|
||||
|
||||
###############
|
||||
#### RULES ####
|
||||
###############
|
||||
|
||||
#
|
||||
# First some standard log files. Log by facility.
|
||||
#
|
||||
*.*;auth,authpriv.none -/var/log/syslog
|
||||
daemon.* -/var/log/daemon.log
|
||||
kern.* -/var/log/kern.log
|
||||
user.* -/var/log/user.log
|
||||
|
||||
#
|
||||
# Some "catch-all" log files.
|
||||
#
|
||||
*.=debug;\
|
||||
auth,authpriv.none;\
|
||||
mail.none -/var/log/debug
|
||||
*.=info;*.=notice;*.=warn;\
|
||||
auth,authpriv.none;\
|
||||
cron,daemon.none;\
|
||||
mail.none -/var/log/messages
|
||||
Reference in New Issue
Block a user