This commit is contained in:
Elizabeth Cray 2024-10-04 18:54:14 -04:00
parent 8158a41105
commit 8a83c61688

View File

@ -3,7 +3,7 @@ export const handler = async (event) => {
if (event.subject == "You have deliveries" || event.subject == "You have a delivery"){
// Trigger home notification
const command = `ssh ${process.env.INTERNAL_HOST} "/usr/bin/tmux neww -d \"/usr/bin/mplayer '${process.env.INTERNAL_FILE}'\""`;
const { Client } = require('ssh2');
import { Client } from 'ssh2';
const connection = new Client();
connection.on('ready', () => {
connection.exec(command, (error, stream) => {