#!/bin/bash

mkdir ~/.config/autostart
cat > ~/.config/autostart/wazo.desktop <<EOT
[Desktop Entry]
Type=Application
Exec=/usr/local/share/wazo/Wazo-Desktop.AppImage
Hidden=false
X-GNOME-Autostart-enabled=true
Name=Wazo
Comment=Wazo
EOT

cd /usr/local/share/wazo/ || ( echo "Wazo installation error" >&2 ; exit 1 )
exec ./Wazo-Desktop.AppImage
