forked from shaba/openuds
Creating multiple files for actor
This commit is contained in:
parent
0c8a1447bf
commit
7afa2b8042
@ -18,7 +18,15 @@ CACHES := $(shell find $(SOURCEDIR) -name '__pycache__')
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(PYC) $(CACHES) $(DESTDIR)
|
rm -rf $(PYC) $(CACHES) $(DESTDIR)
|
||||||
install:
|
install-xrdp-udsactor:
|
||||||
|
mkdir -p $(BINDIR)
|
||||||
|
cp scripts/uds-sesman.sh $(BINDIR)/uds-sesman
|
||||||
|
cp scripts/uds-wait-session.sh $(BINDIR)/uds-wait-session
|
||||||
|
|
||||||
|
chmod 0755 $(BINDIR)/uds-sesman
|
||||||
|
chmod 0755 $(BINDIR)/uds-wait-session
|
||||||
|
|
||||||
|
install-udsactor:
|
||||||
rm -rf $(DESTDIR)
|
rm -rf $(DESTDIR)
|
||||||
mkdir -p $(LIBDIR)
|
mkdir -p $(LIBDIR)
|
||||||
mkdir -p $(BINDIR)
|
mkdir -p $(BINDIR)
|
||||||
|
1
actors/linux/debian/.gitignore
vendored
1
actors/linux/debian/.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
/udsactor/
|
/udsactor/
|
||||||
|
/udsactor-xrdp/
|
||||||
|
@ -13,5 +13,11 @@ Architecture: all
|
|||||||
Depends: policykit-1(>=0.100), python-requests (>=0.8.2), python-qt4 (>=4.9), python-six(>=1.1), python-prctl(>=1.1.1), python (>=2.7), ${misc:Depends}
|
Depends: policykit-1(>=0.100), python-requests (>=0.8.2), python-qt4 (>=4.9), python-six(>=1.1), python-prctl(>=1.1.1), python (>=2.7), ${misc:Depends}
|
||||||
Description: Actor for Universal Desktop Services (UDS) Broker
|
Description: Actor for Universal Desktop Services (UDS) Broker
|
||||||
This package provides the required components to allow this machine to work on an environment managed by UDS Broker.
|
This package provides the required components to allow this machine to work on an environment managed by UDS Broker.
|
||||||
.
|
|
||||||
|
|
||||||
|
Package: udsactor-xrdp
|
||||||
|
Section: x11
|
||||||
|
Priority: optional
|
||||||
|
Architecture: all
|
||||||
|
Depends: xrdp (>= 0.6.0), udsactor (>= ${Source-Version}), libpam-modules-bin (>=1.0), ${misc:Depends}
|
||||||
|
Description: UDS Actor component for xrdp
|
||||||
|
This package provides connection between uds actor and xrdp, so session can be managed
|
||||||
|
@ -1 +1,2 @@
|
|||||||
udsactor_1.7.0_all.deb admin optional
|
udsactor_1.7.0_all.deb admin optional
|
||||||
|
udsactor-xrdp_1.7.0_all.deb x11 optional
|
||||||
|
@ -21,7 +21,8 @@ install: build
|
|||||||
dh_testroot
|
dh_testroot
|
||||||
dh_prep
|
dh_prep
|
||||||
dh_installdirs
|
dh_installdirs
|
||||||
$(MAKE) DESTDIR=$(CURDIR)/debian/udsactor install
|
$(MAKE) DESTDIR=$(CURDIR)/debian/udsactor install-udsactor
|
||||||
|
$(MAKE) DESTDIR=$(CURDIR)/debian/udsactor-xrdp install-xrdp-udsactor
|
||||||
binary-arch: build install
|
binary-arch: build install
|
||||||
# emptyness
|
# emptyness
|
||||||
binary-indep: build install
|
binary-indep: build install
|
||||||
|
13
actors/linux/scripts/uds-sesman.sh
Executable file
13
actors/linux/scripts/uds-sesman.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
env > /tmp/env.txt
|
||||||
|
|
||||||
|
if [ "$PAM_TYPE" = "open_session" ]; then
|
||||||
|
nohup /usr/bin/udsactor login $PAM_USER &
|
||||||
|
# Wait in backgroud to TTY to close (close_session is not being invoked right now)
|
||||||
|
nohup /usr/bin/uds-wait-session &
|
||||||
|
elif [ "$PAM_TYPE" = "close_session" ]; then
|
||||||
|
nohup /usr/bin/udsactor logout $PAM_USER &
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
12
actors/linux/scripts/uds-wait-session.sh
Executable file
12
actors/linux/scripts/uds-wait-session.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
while :
|
||||||
|
do
|
||||||
|
sleep 5 # Wait 5 seconds between checks
|
||||||
|
found=`ps -f -u$PAM_USER | grep -v grep | grep -v uds-wait-session | grep "$PAM_TTY" | wc -l`
|
||||||
|
|
||||||
|
if [ "$found" = "0" ]; then
|
||||||
|
/usr/bin/udsactor logout $PAM_USER
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
Loading…
x
Reference in New Issue
Block a user