Posts

Showing posts from 2016

Ubuntu server automaattinen kellonajan asetus (NTP)

sudo su dpkg-reconfigure tzdata (saat määritetyä aikavyöhykkeen, mikäli tarvetta) apt-get install ntp asennus valmis ntpq -c peers (näyttää mistä aikapalvelimilta synkkaus tapahtuu) Tähdellä merkitty mistä synkkaa. Plussat varalla. Miinuksella merkattu heittää liikaa ja hylätty ------------------------------------------ hwclock -r (näyttää bios kellon) hwclock -w (asettaa sen ntp aikaan)

OPENWRT Automaattinen boottaus

Seuraavilla komennoilla saat openwrt:n boottaamaan automaattisesti haluamanasi ajankohtana: export EDITOR=nano (vaihtaa editorin nano:ksi) crontab -e (pääset luomaan ajastetun komennon NANO editorilla) 0 4 * * * reboot now (lisää rivi tiedostoon ja tallenna. Automaattinen boottaus joka päivä klo 04:00) ----------------------------------------------------------------------------------- The first number denotes the minute (0-59). In this case, 0 represents the top of the hour. The second number denotes the hour (0-23). In this case, 3 represents 3 AM. The third number denotes the day of the month (1-31). In this case, * matches any day of the month, so this field is ignored. The fourth number denotes the month of the year (1-12). In this case, * matches any day of the month, so this field is ignored. The fifth number denotes the day of the week (0-6) beginning with Sunday. In this case, 0 represents Sunday. The final item is the command to be run. The crontab ...

Openelec Raspberry MPEG2 Codec

Mikäli käyttää tvheadend addonia Kodissa Raspberryllä saattaa törmätä ongelmiin kanavaa vaihtaessa. SD kanavalta vaihtaessa HD kanavalle, kuva "jäätyy". Myös SD nauhoitteiden kelaamisessa saattaa esiintyä ongelmia. Tähän auttaa mpeg2 codecin  ostaminen. Codecin asentaminen openeleciin onnistuu seuraavasti: 1. Ota SSH yhteys Raspberryyn 2. mount -o remount,rw /flash 3. nano /flash/config.txt 4. decode_MPG2=0000000000 (lisää viimeiselle riville, nollien paikalla raspberryltä saamasi koodi) 5. poistu editorista ja tallenna muutokset ctrl-x 6. mount -o remount,ro /flash 7. reboot Uudelleen käynnistyksen jälkeen voit ottaa uudelleen SSH yhteyden ja tarkistaa, onnistuiko aktivointi antamalla käskyn: vcgencmd codec_enabled MPG2 Mikäli codecin aktivointi onnistui tulee näkyviin: MPG2=enabled (Huom!: Case sensitive, MPG2 tulee kirjoittaa AINA ISOLLA)