Skip to content

Commit

Permalink
Clean launch scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
algorys committed Oct 7, 2016
1 parent 2e06c81 commit 7512f93
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
17 changes: 17 additions & 0 deletions etc/bin/alignak-app
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
#!/bin/bash
# Copyright (c) 2015-2016:
# Matthieu Estrada, ttamalfor@gmail.com
#
# This file is part of (AlignakApp).
#
# (AlignakApp) is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# (AlignakApp) is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with (AlignakApp). If not, see <http://www.gnu.org/licenses/>.

echo "Alignak-app start !"
python $HOME/bin/alignak_app/launch.py &
12 changes: 6 additions & 6 deletions etc/bin/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# along with (AlignakApp). If not, see <http://www.gnu.org/licenses/>.

"""
Launch is launching application.
Launch is launching Alignak-app.
"""

import os
Expand All @@ -39,11 +39,11 @@ def launch():
"""

# Actually, we must verify we are in DESKTOP_SESSION or not
# try:
# os.environ['DESKTOP_SESSION']
# except KeyError as e:
# logger.critical('You must be in desktop session to launch Alignak-App : ' + str(e))
# sys.exit()
try:
os.environ['DESKTOP_SESSION']
except KeyError as e:
logger.critical('You must be in desktop session to launch Alignak-App : ' + str(e))
sys.exit()

App().run()

Expand Down

0 comments on commit 7512f93

Please sign in to comment.