Mediacenter

De whats Wiki

Dreceres ràpides: navegació, cerca

Contingut

/etc/rc.local

#canviem la politica d'us de les cpu's
#for i in /sys/devices/system/cpu/cpu*; do echo "ondemand" > $i/cpufreq/scaling_governor; echo 800000 > $i/cpufreq/scaling_min_freq; done
for i in /sys/devices/system/cpu/cpu*
do 
       echo "ondemand" > $i/cpufreq/scaling_governor
       echo 40 > $i/cpufreq/ondemand/up_threshold
       echo 500000 > $i/cpufreq/ondemand/sampling_rate
done

#configuracio de la wireless
#iwconfig ath0 essid Fuckme channel 11 key 415142524353696955555555515

iwpriv ath0 authmode 2
#ip a a 192.168.3.8/24 dev ath0
#ip r a default via 192.168.3.1
#ip l set ath0 up

#per el mando a distancia
sudo -u whats irexec &

/etc/modules

p4_clockmod

apache2

adduser www-data pis

/etc/apache2/httpd.conf

# Per asegurar l'apache
ServerSignature Off
ServerTokens Prod
<Directory />
 Order Deny,Allow
 Deny from all
 Options None
 AllowOverride None
</Directory>

/etc/apache2/sites-enabled/000-default

NameVirtualHost *:80
NameVirtualHost *:443
<VirtualHost *:80>
       ServerAdmin whats@wekk.net
       DocumentRoot /tmp/
       RedirectPermanent / https://niu.wekk.net/
</VirtualHost>

<VirtualHost *:443>
 ServerAdmin whats@wekk.net
 #activar SSL - els certificats estan a wekk.net
 SSLEngine on
 SSLCertificateFile /etc/ssl/certs/niu.wekk.net-httpd.crt
 SSLCertificateKeyFile /etc/ssl/private/niu.wekk.net-httpd.key2
 #SSLCACertificateFile  /etc/ssl/ssl.crt/ca-server.crt

 DocumentRoot /data/
 <Directory />
    AuthName "Niu de wekk.net"
    AuthType Basic
    AuthUserFile /etc/apache2/.htpasswd
    AuthGroupFile /etc/apache2/.htgroup
    Require group pis
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Allow from all
  </Directory>
</VirtualHost>

lircd

/etc/lirc/lircd.conf

# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.8.0(userspace) on Tue Jan  9 00:31:16 2007
#
# contributed by 
#
# brand:                       lircd.confd
# model no. of remote control: 
# devices being controlled by this remote:
#

begin remote
 name    AVERMEDIA
 bits           16
 eps            30
 aeps          100
 one             0     0
 zero            0     0
 pre_data_bits   16
 pre_data       0x1
 gap          403783
 toggle_bit      1
 repeat_bit      0


     begin codes
         1                        0x0002
         2                        0x0003
         3                        0x0004
         4                        0x0005
         5                        0x0006
         6                        0x0007
         7                        0x0008
         8                        0x0009
         9                        0x000A
         L                        0x0069
         ENTER                    0x000B
         R                        0x006A
         SNAPSHOT                 0x0095
         16-CHPREV                0x00CA
         VOLDOWN                  0x0072
         VOLUP                    0x0073
         CHUP                     0x0192
         CHDOWN                   0x0193
         FULLSCREEN               0x0174
         MUTE                     0x0071
         AUDIO                    0x0188
         POWER                    0x0074
         SOURCE                   0x0094
         RECORD                   0x00A7
         PLAY                     0x00CF
         STOP                     0x0080
         PLAYPAUSE                0x00A4
         REV                      0x009E
         FORWD                    0x009F
         TELETEX                  0x0184
         WAKEUP                   0x0194
         SLEEP                    0x0195
         EGP                      0x016D
         MENU                     0x008B
     end codes
end remote

.lircrc

# start playback
begin
remote = AVERMEDIA
button = PLAY
prog   = xine
repeat = 0
config = Play
end

# playback pause toggle
begin
remote = AVERMEDIA
button = PLAYPAUSE
prog   = xine
repeat = 0
config = Pause
end

# stop playback
begin
remote = AVERMEDIA
button = STOP
prog   = xine
repeat = 0
config = Stop
end

# take a snapshot
begin
remote = AVERMEDIA
button = SNAPSHOT
prog   = xine
repeat = 0
config = Snapshot
end

# eject the current medium
begin
remote = AVERMEDIA
button = xxxxx
prog   = xine
repeat = 0
config = Eject
end

# set position to -60 seconds in current stream
begin
remote = AVERMEDIA
button = WAKEUP
prog   = xine
repeat = 0
config = SeekRelative-60
end

# set position to +60 seconds in current stream
begin
remote = AVERMEDIA
button = SLEEP
prog   = xine
repeat = 0
config = SeekRelative+60
end

# set position to -30 seconds in current stream
begin
remote = AVERMEDIA
button = REV
prog   = xine
repeat = 0
config = SeekRelative-30
end

# set position to +30 seconds in current stream
begin
remote = AVERMEDIA
button = FORWD
prog   = xine
repeat = 0
config = SeekRelative+30
end

# set position to beginning of current stream
begin
remote = AVERMEDIA
button = xxxxx
prog   = xine
repeat = 0
config = SetPosition0%
end

# increment audio volume
begin
remote = AVERMEDIA
button = VOLUP
prog   = xine
repeat = 0
config = Volume+
end

# decrement audio volume
begin
remote = AVERMEDIA
button = VOLDOWN
prog   = xine
repeat = 0
config = Volume-
end

# audio muting toggle
begin
remote = AVERMEDIA
button = MUTE
prog   = xine
repeat = 0
config = Mute
end

# fullscreen toggle
begin
remote = AVERMEDIA
button = FULLSCREEN
prog   = xine
repeat = 0
config = ToggleFullscreen
end

# jump to Root Menu
begin
remote = AVERMEDIA
button = MENU
prog   = xine
repeat = 0
config = RootMenu
end

# jump to Subpicture Menu
begin
remote = AVERMEDIA
button = 16-CHPREV
prog   = xine
repeat = 0
config = SubpictureMenu
end

# jump to Audio Menu
begin
remote = AVERMEDIA
button = AUDIO
prog   = xine
repeat = 0
config = AudioMenu
end

# menu navigate up
begin
remote = AVERMEDIA
button = 2
prog   = xine
repeat = 0
config = EventUp
end

# menu navigate down
begin
remote = AVERMEDIA
button = 8
prog   = xine
repeat = 0
config = EventDown
end

# menu navigate left
begin
remote = AVERMEDIA
button = 4
prog   = xine
repeat = 0
config = EventLeft
end

# menu navigate right
begin
remote = AVERMEDIA
button = 6
prog   = xine
repeat = 0
config = EventRight
end

# menu select
begin
remote = AVERMEDIA
button = ENTER
prog   = xine
repeat = 0
config = EventSelect
end

# jump to next chapter
begin
remote = AVERMEDIA
button = xxxxx
prog   = xine
repeat = 0
config = EventNext
end

# jump to previous chapter
begin
remote = AVERMEDIA
button = xxxxx
prog   = xine
repeat = 0
config = EventPrior
end

# enter the number 0
begin
remote = AVERMEDIA
button = xxxxx
prog   = xine
repeat = 0
config = Number0
end

# enter the number 1
begin
remote = AVERMEDIA
button = 1
prog   = xine
repeat = 0
config = Number1
end

# enter the number 2
begin
remote = AVERMEDIA
button = 2
prog   = xine
repeat = 0
config = Number2
end

# enter the number 3
begin
remote = AVERMEDIA
button = 3
prog   = xine
repeat = 0
config = Number3
end

# enter the number 4
begin
remote = AVERMEDIA
button = 4
prog   = xine
repeat = 0
config = Number4
end

# enter the number 5
begin
remote = AVERMEDIA
button = 5
prog   = xine
repeat = 0
config = Number5
end

# enter the number 6
begin
remote = AVERMEDIA
button = 6
prog   = xine
repeat = 0
config = Number6
end

# enter the number 7
begin
remote = AVERMEDIA
button = 7
prog   = xine
repeat = 0
config = Number7
end

# enter the number 8
begin
remote = AVERMEDIA
button = 8
prog   = xine
repeat = 0
config = Number8
end

# enter the number 9
begin
remote = AVERMEDIA
button = 9
prog   = xine
repeat = 0
config = Number9
end

# add 10 to the next entered number
begin
remote = AVERMEDIA
button = xxxxx
prog   = xine
repeat = 0
config = Number10add
end

# toggle TV modes (on the DXR3)
begin
remote = AVERMEDIA
button = xxxxx
prog   = xine
repeat = 0
config = ToggleTVmode
end

# switch Monitor to DPMS standby mode
begin
remote = AVERMEDIA
button = xxxxx
prog   = xine
repeat = 0
config = DPMSStandby
end

# quit the program
begin
remote = AVERMEDIA
button = POWER
prog   = xine
repeat = 0
config = Quit
end

##
# Amarok
##
begin
prog = irexec
remote = AVERMEDIA
button = Play
config = dcop amarok player play
end

begin
prog = irexec
remote = AVERMEDIA
button = Stop
config = dcop amarok player stop
end

begin
prog = irexec
remote = AVERMEDIA
button = PLAYPAUSE
config = dcop amarok player playPause
end

begin
prog = irexec
remote = AVERMEDIA
button = VOLDOWN
repeat = 2
config = dcop amarok player volumeDown
end

begin
prog = irexec
remote = AVERMEDIA
button = VOLUP
repeat = 2
config = dcop amarok player volumeUp
end

begin
prog = irexec
remote = AVERMEDIA
button = Forwd
repeat = 3
config = dcop amarok player seekRelative 5
end

begin
prog = irexec
remote = AVERMEDIA
button = Rev
repeat = 3
config = dcop amarok player seekRelative -5
end

begin
prog = irexec
remote = AVERMEDIA
button = Blank
config = dcop amarok playlist clearPlaylist
end

begin
prog = irexec
remote = AVERMEDIA
button = Mute
config = dcop amarok player mute
end

begin
prog = irexec
remote = AVERMEDIA
button = Sleep
repeat = 3
config = dcop amarok player next
end

begin
prog = irexec
remote = AVERMEDIA
button = wakeup
repeat = 3
config = dcop amarok player prev
end

begin
prog = irexec
remote = AVERMEDIA
button = Full
repeat = 3
config = dcop amarok player showOSD
end


vsftpd

postfix

/etc/postfix/main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
smtpd_banner = $myhostname ESMTP server
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no
unknown_local_recipient_reject_code = 550
smtp_never_send_ehlo = yes
smtpd_helo_required = yes
disable_vrfy_command = yes

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

# TLS parameters
#smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
#smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
#smtpd_use_tls=yes
#smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
#smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = niu.wekk.net
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = niu.wekk.net
mydestination = niu.wekk.net, localhost
relayhost = mail.wekk.net
relay_domains = salles.mine.nu crade.shacknet.nu elizir.mine.nu wekk.net catsec.org catsec.net grocsdisseny.com
mynetworks = 127.0.0.0/8, 192.168.3.0/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

/etc/aliases

root: whats wekk.net

amule

getright?

asoundrc

Crear el fitxer ~/.asoundrc

pcm.!default {
   type plug
   slave.pcm "surround51"
   slave.channels 6
   route_policy duplicate
}

altres

beep-media-player
amarok
ssh