From 76d563dd9eadac4b705c9daf996b493d910f63be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yunusemre=20=C5=9Eent=C3=BCrk?= Date: Tue, 21 Nov 2017 11:36:11 +0300 Subject: [PATCH] Change commands calling ahenkd from /opt to /usr/share --- etc/ahenk/ahenk.conf | 2 +- lib/systemd/system/ahenk.service | 4 ++-- opt/ahenk/base/agreement/agreement.py | 2 +- opt/ahenk/base/util/util.py | 2 +- usr/share/libpam-script/pam_script_ses_close | 2 +- usr/share/libpam-script/pam_script_ses_open | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/etc/ahenk/ahenk.conf b/etc/ahenk/ahenk.conf index 6281122..449a65b 100644 --- a/etc/ahenk/ahenk.conf +++ b/etc/ahenk/ahenk.conf @@ -3,7 +3,7 @@ logconfigurationfilepath = /etc/ahenk/log.conf dbpath = /etc/ahenk/ahenk.db [PLUGIN] -pluginfolderpath = /opt/ahenk/plugins/ +pluginfolderpath = /usr/share/ahenk/plugins/ mainmodulename = main [CONNECTION] diff --git a/lib/systemd/system/ahenk.service b/lib/systemd/system/ahenk.service index a6083de..420dc39 100644 --- a/lib/systemd/system/ahenk.service +++ b/lib/systemd/system/ahenk.service @@ -4,8 +4,8 @@ After=network.target [Service] Type=simple -ExecStart=/usr/bin/python3 /opt/ahenk/ahenkd.py start -ExecStop=/usr/bin/python3 /opt/ahenk/ahenkd.py stop +ExecStart=/usr/bin/python3 /usr/share/ahenk/ahenkd.py start +ExecStop=/usr/bin/python3 /usr/share/ahenk/ahenkd.py stop PIDFile=/var/run/ahenkd.pid Restart=always diff --git a/opt/ahenk/base/agreement/agreement.py b/opt/ahenk/base/agreement/agreement.py index a27faa2..97c54f0 100644 --- a/opt/ahenk/base/agreement/agreement.py +++ b/opt/ahenk/base/agreement/agreement.py @@ -14,7 +14,7 @@ class Agreement: self.message_manager = scope.get_message_manager() self.messenger = scope.get_messenger() self.db_service = scope.get_db_service() - self.ask_path = '/opt/ahenk/base/agreement/ask.py' + self.ask_path = '/usr/share/ahenk/base/agreement/ask.py' self.logger.debug('Instance initialized.') def agreement_contract_update(self): diff --git a/opt/ahenk/base/util/util.py b/opt/ahenk/base/util/util.py index cbbc706..738dbb5 100644 --- a/opt/ahenk/base/util/util.py +++ b/opt/ahenk/base/util/util.py @@ -316,7 +316,7 @@ class Util: @staticmethod def ask_permission(display, username, message, title): - ask_path = '/opt/ahenk/base/agreement/confirm.py' + ask_path = '/usr/share/ahenk/base/agreement/confirm.py' try: if username is not None: diff --git a/usr/share/libpam-script/pam_script_ses_close b/usr/share/libpam-script/pam_script_ses_close index 344d77f..f5bab47 100755 --- a/usr/share/libpam-script/pam_script_ses_close +++ b/usr/share/libpam-script/pam_script_ses_close @@ -25,6 +25,6 @@ if [ -n $PAM_USER ] && [ $PAM_USER != "root" ]; then TTY_DISPLAY="$PAM_TTY" fi log "logout: $PAM_USER service: $SERVICE tty: $TTY_DISPLAY" - sudo python3 /opt/ahenk/ahenkd.py logout $PAM_USER + sudo python3 /usr/share/ahenk/ahenkd.py logout $PAM_USER fi fi diff --git a/usr/share/libpam-script/pam_script_ses_open b/usr/share/libpam-script/pam_script_ses_open index 00b5450..3512806 100755 --- a/usr/share/libpam-script/pam_script_ses_open +++ b/usr/share/libpam-script/pam_script_ses_open @@ -25,6 +25,6 @@ if [ -n $PAM_USER ] && [ $PAM_USER != "root" ]; then TTY_DISPLAY="$PAM_TTY" fi log "login: $PAM_USER service: $SERVICE tty: $TTY_DISPLAY" - sudo python3 /opt/ahenk/ahenkd.py login $PAM_USER $SERVICE $TTY_DISPLAY + sudo python3 /usr/share/ahenk/ahenkd.py login $PAM_USER $SERVICE $TTY_DISPLAY fi fi