feat: add stop-app script and update desktop shortcut setup
Adds stop-app.sh to kill all services by port (5000-5003, 3000/3001) and updates setup-desktop-shortcut.sh to create both Start and Stop desktop shortcuts in a single run. README Step 13 updated accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,14 +4,15 @@ PROJECT_DIR="$HOME/Desktop/DentalManagementMH06"
|
||||
ICON_SRC="$PROJECT_DIR/assets/dental-icon.svg"
|
||||
ICON_DEST="$HOME/.local/share/icons/dental-icon.svg"
|
||||
|
||||
# Make start script executable
|
||||
# Make scripts executable
|
||||
chmod +x "$PROJECT_DIR/start-app.sh"
|
||||
chmod +x "$PROJECT_DIR/stop-app.sh"
|
||||
|
||||
# Install icon
|
||||
mkdir -p "$HOME/.local/share/icons"
|
||||
cp "$ICON_SRC" "$ICON_DEST"
|
||||
|
||||
# Create desktop shortcut
|
||||
# Create Start shortcut
|
||||
cat > "$HOME/Desktop/DentalApp.desktop" <<EOF
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
@@ -27,4 +28,20 @@ EOF
|
||||
chmod +x "$HOME/Desktop/DentalApp.desktop"
|
||||
gio set "$HOME/Desktop/DentalApp.desktop" metadata::trusted true 2>/dev/null
|
||||
|
||||
echo "Desktop shortcut created successfully!"
|
||||
# Create Stop shortcut
|
||||
cat > "$HOME/Desktop/StopDentalApp.desktop" <<EOF
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Name=Stop Dental App
|
||||
Comment=Stop all Dental App services and free all ports
|
||||
Exec=bash -c "$PROJECT_DIR/stop-app.sh; zenity --info --text='Dental App stopped.' --timeout=3 2>/dev/null || true"
|
||||
Icon=system-shutdown
|
||||
Terminal=false
|
||||
Categories=Application;
|
||||
EOF
|
||||
|
||||
chmod +x "$HOME/Desktop/StopDentalApp.desktop"
|
||||
gio set "$HOME/Desktop/StopDentalApp.desktop" metadata::trusted true 2>/dev/null
|
||||
|
||||
echo "Desktop shortcuts created successfully! (Start + Stop)"
|
||||
|
||||
Reference in New Issue
Block a user