forked from XX-net/XX-Net
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request XX-net#7777 from wooowooo/optional_cert
NO_MESS_SYSTEM support
- Loading branch information
Showing
5 changed files
with
95 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
|
||
# variable XXNETPATH is env by python call | ||
|
||
function createDesktopStartup() { | ||
DESKDIR=~/Desktop/ | ||
|
||
if [[ -d $DESKDIR ]]; then | ||
DESKFILE="$DESKDIR/XX-Net.desktop" | ||
else | ||
echo "$DESKDIR does not exist" | ||
return -1 | ||
fi | ||
|
||
# python won't call this script if lastrun in config matchs the current run | ||
|
||
#if [[ -f $DESKFILE ]]; then | ||
# echo "$DESKFILE already exists" | ||
# return | ||
#else | ||
# echo "$DESKFILE does not exist,create a new one" | ||
#fi | ||
|
||
NAME="XX-Net" | ||
EXEC="$XXNETPATH/start > /dev/null" | ||
ICON="$XXNETPATH/code/default/launcher/web_ui/favicon.ico" | ||
TERMINAL="false" | ||
TYPE="Application" | ||
CATEGORIES="Development" | ||
echo "[Desktop Entry]" > "$DESKFILE" | ||
#echo "Version=$VERSION" >> "$DESKFILE" | ||
echo "Name=$NAME" >> "$DESKFILE" | ||
echo "Exec=$EXEC" >> "$DESKFILE" | ||
echo "Terminal=$TERMINAL" >> "$DESKFILE" | ||
echo "Icon=$ICON" >> "$DESKFILE" | ||
echo "Type=$TYPE" >> "$DESKFILE" | ||
echo "Categories=$CATEGORIES" >> "$DESKFILE" | ||
|
||
chmod 744 $DESKFILE | ||
|
||
} | ||
|
||
# create a desktop startup file when the distro is Ubuntu. | ||
DIS=`cat /etc/issue 2> /dev/null` | ||
if [[ $DIS == *Ubuntu* ]]; then | ||
createDesktopStartup | ||
else | ||
echo "Not ubuntu. Not creating shortcut" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters