Patchwork desktop icon on mesh client

This commit is contained in:
Bob Mottram 2017-09-17 15:16:05 +01:00
parent 2e630eb991
commit af97157d4a
1 changed files with 21 additions and 0 deletions

View File

@ -588,6 +588,21 @@ EOF
fi
fi
rm $rootdir/usr/bin/install_patchwork
echo '#!/bin/bash' > $rootdir/usr/bin/start_patchwork
echo 'cd /etc/patchwork' > $rootdir/usr/bin/start_patchwork
echo 'npm start' > $rootdir/usr/bin/start_patchwork
chmod +x $rootdir/usr/bin/start_patchwork
echo '[Desktop Entry]' > $rootdir/home/$MY_USERNAME/Desktop/social.desktop
echo 'Name=Social' >> $rootdir/home/$MY_USERNAME/Desktop/social.desktop
echo 'Type=Application' >> $rootdir/home/$MY_USERNAME/Desktop/social.desktop
echo 'Comment=A decentralized messaging and sharing app built on top of Secure Scuttlebutt (SSB)' >> $rootdir/home/$MY_USERNAME/Desktop/social.desktop
echo 'Exec=bash /usr/bin/start_patchwork' >> $rootdir/home/$MY_USERNAME/Desktop/social.desktop
echo "Icon=/root/freedombone/img/icon_patchwork.png" >> $rootdir/home/$MY_USERNAME/Desktop/social.desktop
echo 'StartupNotify=true' >> $rootdir/home/$MY_USERNAME/Desktop/social.desktop
chmod +x $rootdir/home/$MY_USERNAME/Desktop/social.desktop
chown $MY_USERNAME:$MY_USERNAME $rootdir/home/$MY_USERNAME/Desktop/social.desktop
}
initialise_mesh() {
@ -894,6 +909,9 @@ if [ \$no_of_users -gt 0 ]; then
chmod +x /home/$MY_USERNAME/Desktop/tox.desktop
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/tox.desktop
fi
if [ ! -f /home/$MY_USERNAME/Desktop/social.desktop ]; then
sed -i 's|Name=.*|Name=Social|g' /home/$MY_USERNAME/Desktop/social.desktop
fi
else
if [ -f /tmp/Users.txt ]; then
rm /tmp/Users.txt
@ -910,6 +928,9 @@ else
if [ -f /home/$MY_USERNAME/Desktop/tox.desktop ]; then
rm /home/$MY_USERNAME/Desktop/tox.desktop
fi
if [ -f /home/$MY_USERNAME/Desktop/social.desktop ]; then
sed -i 's|Name=.*|Name=Social (Offline)|g' /home/$MY_USERNAME/Desktop/social.desktop
fi
pkill qtox
fi
fi