Homebridge Befehlssammlung
-
-
SSH Root Login Aktivierung aufgenommen.
Benötigt bei Root Zugriff über FTP Programme wie File Zilla.
Basis Befehle für Systemd Service & Timer aufgenommen
Ich habe bei mir
node --version
v6.11.0
nun würde ich diese gerne aktualisieren, doch ich weiss leider nicht wie und welche Version zu empfehlen ist.
Kann mir jemand sagen wie ich das machen kann?
Ich habe bei mir
node --version
v6.11.0
nun würde ich diese gerne aktualisieren, doch ich weiss leider nicht wie und welche Version zu empfehlen ist.
Kann mir jemand sagen wie ich das machen kann?
Ich verwende zum aktualisieren von node das Tool von det , zu finden hier im Forum unter homebridge/anleitungen
Ich verwende immer die node lts version, dies ist die neueste version, welche am stabilsten läuft.
Diese ist -zumindest für meine plugins, immer ausreichend.
Gesendet von iPhone mit Community
Ich mach's mit n.
sudo npm install -g --unsafe-perm n
und dann kann man mit n --help die Optionen sehen.
So installiert beispielsweise sudo n lts die letzte Long Time Support-Version und sudo n latest die neueste Version. Ich bin sicher, du wirst das eine oder andere Plugin erneut installieren müssen.
Stefan
Ich habe das mit dem Script auch schon versucht, doch leider bekomme ich diesen Fehler.
Code
Alles anzeigen/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:57 log.progressEnabled = log.gauge.isEnabled() ^ TypeError: log.gauge.isEnabled is not a function at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:57:33) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at /usr/local/lib/node_modules/npm/bin/npm-cli.js:22:13 at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:153:3) sudo: n: Befehl nicht gefunden /usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:57 log.progressEnabled = log.gauge.isEnabled() ^ TypeError: log.gauge.isEnabled is not a function at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:57:33) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at /usr/local/lib/node_modules/npm/bin/npm-cli.js:22:13 at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:153:3) Falls beim starten der Dienste Fehler auftreten, bitte folgende Befehle ausführen: hbridge_new.sh service stop cd /usr/local/lib/node_modules/ sudo chown -R $USER /usr/local && npm rebuild hbridge_new.sh service start node Version: v6.11.0
Hi,
ich konnte bisher online oder hier keine Loesung finden, weshalb ich mal auf das Schwarmwissen hoffe:
Gibt es einen Befehl, mit dem ich automatisch Zeile X durch Zeile Y in einem File ersetzen kann?
Beispiel: /etc/ssh/sshd_config
Moechte ich in diesem File die Zeile: #PermitRootLogin aendern in PermitRootLogin Yes aendern, dann muss ich manuell dorthin navigieren und die Aenderungen vornehmen.
Bisher konnte ich nur diesen Befehl finden:
echo 'XXXXXXXXXXX' >> /etc/ssh/sshd_config welches ganz am Ende des Dokuments XXXXXXXXXXX einfuegt. Gibt es sowas, oder hat es bewusst einen grund, warum es das nicht gibt?
Danke schonmal
Gibt es sowas, oder hat es bewusst einen grund, warum es das nicht gibt?
Es gibt auf Linux- oder Unix-Systemen nichts, was es nicht geben soll. Das kann man mit sed (kaputt) machen. Also sed -i 's/SUCHBEGRIFF/ERSETZBEGRIFF' dateiname.
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin No/' /etc/sshd/sshd_config
Zitat von vgnsxeMoechte ich in diesem File die Zeile: #PermitRootLogin aendern in PermitRootLogin Yes aendern, dann muss ich manuell dorthin navigieren und die Aenderungen vornehmen.
Möchtest du nicht.
Stefan
Das mit permitrootlogin war nur n Beispiel! ??
Ich werde das mal an Harmlosen Zeilen testen wie sich das verhaelt! Danke schonmal! ?
Weil ich wahrscheinlich so selten benötig, oder tatsächlich noch nie benötigt habe, gibt es einen Befehl wie ich im Journal nur bestimmte Einträge sehe?
Also wenn ich z.B. Homebridge manuell im Terminal im Debug starte
DEBUG=homebridge-tesplugin homebridge -D
Wie bekomm ich eine Auflistung der nur relevanten Einträge von homebridge-tesplugin ?
Dank Euch vorab.
sudo journalctl -f | grep Suchbegriff
oder im SysLog suchen mit
sudo cat /var/log/syslog | grep suchbegriff
Super sehr hilfreich
Hallo,
ich hätte da mal eine Frage zu 2 Befehlen bzw. ich hab eher ein Problem mit diesen.
sudo npm ls
Funktioniert bei mir nicht, es heißt immer das es dort leer ist.
Was mich auch nicht wirklich wundert, denn sie sind hier: /usr/local/lib/node_modules/
sudo npm outdated -g
Zeigt mir aber Updates an, wenn welche vorhanden sind. (Aktuell nicht, da ich alles geupdate habe)
Es wundert mich dass der eine sudo npm befehl richtig funktioniert bei mir aber der andere nicht. Hänge ich beim ersten Befehl auch noch das -g dran. So werden mir alle angezeigt aber auch eben die mich persönlich nicht interessieren. Denn dann werden auch die ganzen Versionen der "unter" Plugins angezeigt aber der Pfad stimmt hier wenigstens...
Code
Alles anzeigen/usr/local/lib ├─┬ [email protected] │ ├─┬ [email protected] │ │ ├── [email protected] deduped │ │ └── [email protected] │ ├─┬ [email protected] │ │ ├─┬ [email protected] │ │ │ ├── [email protected] deduped │ │ │ ├── [email protected] deduped │ │ │ └── [email protected] deduped │ │ ├─┬ [email protected] │ │ │ ├── [email protected] deduped │ │ │ └── [email protected] deduped │ │ └── [email protected] deduped │ ├─┬ [email protected] │ │ ├── [email protected] deduped │ │ └── [email protected] deduped │ ├── [email protected] │ └─┬ [email protected] │ ├── [email protected] deduped │ └── [email protected] deduped ├─┬ [email protected] │ ├─┬ [email protected] │ │ ├─┬ [email protected] │ │ │ ├── @types/[email protected] │ │ │ └─┬ [email protected] │ │ │ └── [email protected] │ │ └─┬ [email protected] │ │ └── [email protected] │ ├── [email protected] │ ├─┬ [email protected] │ │ ├─┬ [email protected] │ │ │ ├── [email protected] │ │ │ ├─┬ [email protected] │ │ │ │ ├─┬ [email protected] │ │ │ │ │ ├─┬ [email protected] │ │ │ │ │ │ ├── [email protected] deduped │ │ │ │ │ │ ├── [email protected] deduped │ │ │ │ │ │ └── [email protected] deduped │ │ │ │ │ ├── [email protected] │ │ │ │ │ ├─┬ [email protected] │ │ │ │ │ │ └── [email protected] deduped │ │ │ │ │ ├── [email protected] │ │ │ │ │ ├── [email protected] │ │ │ │ │ ├── [email protected] deduped │ │ │ │ │ ├── [email protected] │ │ │ │ │ ├── [email protected] deduped │ │ │ │ │ ├── [email protected] deduped │ │ │ │ │ ├─┬ [email protected] │ │ │ │ │ │ ├── [email protected] deduped │ │ │ │ │ │ ├── [email protected] deduped │ │ │ │ │ │ └─┬ [email protected] │ │ │ │ │ │ ├── [email protected] deduped │ │ │ │ │ │ └── [email protected] deduped │ │ │ │ │ └─┬ [email protected] . . . . . . . . ├─┬ [email protected] │ ├─┬ @babel/[email protected] │ │ ├── [email protected] │ │ └── [email protected] │ ├── [email protected] │ ├─┬ [email protected] │ │ └── [email protected] │ ├── [email protected] │ └─┬ [email protected] │ └── [email protected] └── [email protected]
-g bedeut global
ohne -g werden nur deine Plugins angezeigt.Die meisten Plugins der homebridge werden aber -g global installiert, so zu sagen für alle zugreifbar
sudo npm ls
Eat this: npm -g ls oder mit etwas Basilikum und Rosmarin verfeinert: npm -g ls --depth=0
Eat this:npm -g ls
Da kommt dann auch das ganz große Plugins "Log" daher wie wenn ich sudo npm ls -g mache.
der mit etwas Basilikum und Rosmarin verfeinert:npm -g ls --depth=0
Das ist besser, danke dir:
Code
Alles anzeigennpm -g ls --depth=0 /usr/local/lib ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] └── [email protected]
Weil ich es gerade gefunden habe. den Befehl sudo rpi-update würde ich da rausnehmen. Das installiert eine Beta Firmware die unter umständen mehr Probleme macht als es nutzt. Da haben wir im Pi-Forum schon massenhaft Schwierigkeiten bei Leuten gehabt die nicht wussten was sie da tun, weil es eben in irgendeinem Tutorial stand.