You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

68 lines
1.6 KiB

#!/bin/bash
set -e # exit on error
set -o pipefail # exit on pipeline error
set -u # treat unset variable as error
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
$APT_CMD update >>$OUTPUT 2>&1
# install packages
if [ -f $SCRIPT_DIR/$PACKAGE_VARIANT.list ]; then
$APT_CMD install $APT_OPTIONS \
$(grep -vE "^\s*#" $SCRIPT_DIR/$PACKAGE_VARIANT.list | tr "\n" " ") >>$OUTPUT 2>&1
fi
cat >/usr/lib/systemd/system/x11vnc.service <<'EOF'
[Unit]
Description=x11vnc server
After=display-manager.service
[Service]
ExecStart=/usr/bin/x11vnc -many -shared -auth guess -noxdamage -rfbauth /etc/vncpasswd -rfbport 5900 -o /var/log/x11vnc.log
User=root
Restart=on-failure
RestartSec=3
[Install]
WantedBy=graphical.target
EOF
useradd -r novnc
cat >/usr/lib/systemd/system/novnc.service <<'EOF'
[Unit]
Description=NoVNC
After=network.target
[Service]
Type=simple
User=novnc
WorkingDirectory=/usr/share/novnc
ExecStart=/usr/bin/websockify --web /usr/share/novnc/ :6080 127.0.0.1:5900
#ExecStart=/usr/share/novnc/utils/launch.sh
Restart=on-abort
[Install]
WantedBy=multi-user.target
EOF
cat >/mediaplayer.config <<'EOF'
root_password=P1ayMyVide0
user_password=P1ayMyVide0
x11vnc_password=P1ayMyVide0
samba_password=P1ayMyVide0
vlc_password=P1ayMyVide0
nextcloud_password=P1ayMyVide0
media_source="/mediasource"
playing_source="/playingsource"
local_source="/localsource"
local_source_label="LOCALSOURCE"
vlc_name=cvlc
vlc_options=" -f -R --no-video-title --extraintf=http --http-password $vlc_password"
play_pause=1
EOF
systemctl disable smbd
#systemctl disable x11vnc
#systemctl disable novnc