cryptpad hostname
This commit is contained in:
parent
ef686e6264
commit
b1d03ec817
|
@ -897,7 +897,7 @@ function configure_user_interface {
|
|||
#!/bin/bash
|
||||
ethernet_connected=\$(cat /sys/class/net/eth0/carrier)
|
||||
users_list=\$(lstox | awk -F ' ' '{\$1=""; print \$0}' | sed -e 's/^[[:space:]]*//' | sort -d | uniq)
|
||||
if [ ! \$users_list ]; then
|
||||
if [ \${#users_list} -eq 0 ]; then
|
||||
no_of_users=0
|
||||
else
|
||||
no_of_users=\$(echo "\$users_list" | wc -l)
|
||||
|
@ -933,15 +933,15 @@ if [ \$no_of_users -gt 0 ]; then
|
|||
echo 'Name=CryptPad' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
|
||||
echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
|
||||
echo 'Comment=Realtime collaborative editing of documents' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
|
||||
echo "Exec=$BROWSER http://${HOSTNAME}.local" >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
|
||||
echo "Exec=$BROWSER http://\${HOSTNAME}.local" >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
|
||||
echo "Icon=/etc/cryptpad/icon_cryptpad.png" >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
|
||||
echo 'Terminal=false' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
|
||||
echo 'Categories=Application;' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
|
||||
chmod +x /home/$MY_USERNAME/Desktop/cryptpad.desktop
|
||||
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/cryptpad.desktop
|
||||
else
|
||||
if ! grep -q "${HOSTNAME}.local" /home/$MY_USERNAME/Desktop/cryptpad.desktop; then
|
||||
sed -i "s|Exec=.*|Exec=$BROWSER http://${HOSTNAME}.local|g" /home/$MY_USERNAME/Desktop/cryptpad.desktop
|
||||
if ! grep -q "\${HOSTNAME}.local" /home/$MY_USERNAME/Desktop/cryptpad.desktop; then
|
||||
sed -i "s|Exec=.*|Exec=$BROWSER http://\${HOSTNAME}.local|g" /home/$MY_USERNAME/Desktop/cryptpad.desktop
|
||||
fi
|
||||
if grep -q "Offline" /home/$MY_USERNAME/Desktop/cryptpad.desktop; then
|
||||
sed -i 's|Name=.*|Name=CryptPad|g' /home/$MY_USERNAME/Desktop/cryptpad.desktop
|
||||
|
|
Loading…
Reference in New Issue