First setup an unprivileged Ubuntu container with Plex Media Server installed. Inside the container take note of the id of the plex
group.
# Your Plex group's ID may be different
$ getent group plex | cut -d : -f3
998
#! /bin/bash | |
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin | |
user=refhi | |
backups=/home/refhi/backups | |
if [[ $EUID > 0 ]] | |
then echo "Please run as root" | |
exit | |
fi |
var attempts = 1; | |
function createWebSocket () { | |
var connection = new WebSocket(); | |
connection.onopen = function () { | |
// reset the tries back to 1 since we have a new connection opened. | |
attempts = 1; | |
// ...Your app's logic... |
/** | |
* Return a timestamp with the format "m/d/yy h:MM:ss TT" | |
* @type {Date} | |
*/ | |
function timeStamp() { | |
// Create a date object with the current time | |
var now = new Date(); | |
// Create an array with the current month, day and time |