Browse Source

Check whether peertube was installed

stretch
Bob Mottram 4 years ago
parent
commit
efc42f5447
  1. 52
      src/freedombone-image-customise

52
src/freedombone-image-customise

@ -961,31 +961,33 @@ if [ \$no_of_users -gt 0 ]; then
fi
fi
if [ ! -f /home/$MY_USERNAME/.peertube.desktop ]; then
if [ ! -f /home/$MY_USERNAME/Desktop/peertube.desktop ]; then
echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Name=PeerTube' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment=Upload and view videos on the mesh' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[el]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[ar]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[ca]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[hi]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[fr]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[de]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[es]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[it]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[ru]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[zh]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo "Exec=$BROWSER $BROWSER_OPTIONS http://\${HOSTNAME}.local:$MESH_PEERTUBE_PORT" >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo "Icon=/usr/share/$PROJECT_NAME/avatars/icon_peertube.png" >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Terminal=false' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Categories=Application;' >> /home/$MY_USERNAME/Desktop/peertube.desktop
chmod +x /home/$MY_USERNAME/Desktop/peertube.desktop
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/peertube.desktop
else
if ! grep -q "\${HOSTNAME}.local" /home/$MY_USERNAME/Desktop/peertube.desktop; then
sed -i "s|Exec=.*|Exec=$BROWSER $BROWSER_OPTIONS http://\${HOSTNAME}.local:$MESH_PEERTUBE_PORT|g" /home/$MY_USERNAME/Desktop/peertube.desktop
if [ -d /etc/peertube ]; then
if [ ! -f /home/$MY_USERNAME/.peertube.desktop ]; then
if [ ! -f /home/$MY_USERNAME/Desktop/peertube.desktop ]; then
echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Name=PeerTube' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment=Upload and view videos on the mesh' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[el]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[ar]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[ca]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[hi]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[fr]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[de]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[es]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[it]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[ru]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Comment[zh]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo "Exec=$BROWSER $BROWSER_OPTIONS http://\${HOSTNAME}.local:$MESH_PEERTUBE_PORT" >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo "Icon=/usr/share/$PROJECT_NAME/avatars/icon_peertube.png" >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Terminal=false' >> /home/$MY_USERNAME/Desktop/peertube.desktop
echo 'Categories=Application;' >> /home/$MY_USERNAME/Desktop/peertube.desktop
chmod +x /home/$MY_USERNAME/Desktop/peertube.desktop
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/peertube.desktop
else
if ! grep -q "\${HOSTNAME}.local" /home/$MY_USERNAME/Desktop/peertube.desktop; then
sed -i "s|Exec=.*|Exec=$BROWSER $BROWSER_OPTIONS http://\${HOSTNAME}.local:$MESH_PEERTUBE_PORT|g" /home/$MY_USERNAME/Desktop/peertube.desktop
fi
fi
fi
fi

Loading…
Cancel
Save