parent
a314307a56
commit
a7528dbb20
|
@ -0,0 +1,6 @@
|
|||
case "${ACTION}" in
|
||||
post)
|
||||
chgrp x2gouser usr/lib/x2go/libx2go-server-db-sqlite3-wrapper
|
||||
chmod g+s usr/lib/x2go/libx2go-server-db-sqlite3-wrapper
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
exec logger -p daemon.info -t x2gocleansessions
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
exec /usr/bin/x2gocleansessions --nofork
|
|
@ -0,0 +1,71 @@
|
|||
diff --git a/x2goserver/sbin/x2gocleansessions b/x2goserver/sbin/x2gocleansessions
|
||||
index e78f677..8e2ba43 100755
|
||||
--- a/x2goserver/sbin/x2gocleansessions
|
||||
+++ b/x2goserver/sbin/x2gocleansessions
|
||||
@@ -40,15 +40,17 @@ use Pod::Usage;
|
||||
Getopt::Long::Configure("gnu_getopt", "no_auto_abbrev");
|
||||
|
||||
my $debug = 0;
|
||||
+my $nofork = 0;
|
||||
my $help = 0;
|
||||
my $man = 0;
|
||||
-GetOptions('debug|d' => \$debug, 'help|?|h' => \$help, 'man' => \$man) or pod2usage(2);
|
||||
+GetOptions('debug|d' => \$debug, 'nofork|n' => \$nofork, 'help|?|h' => \$help, 'man' => \$man) or pod2usage(2);
|
||||
pod2usage(1) if $help;
|
||||
pod2usage(-verbose => 2, -exitval => 0) if $man;
|
||||
|
||||
openlog($0,'cons,pid','user');
|
||||
if ($debug)
|
||||
{
|
||||
+ $nofork = 1;
|
||||
setlogmask( LOG_UPTO (LOG_DEBUG) );
|
||||
}
|
||||
else
|
||||
@@ -99,12 +101,12 @@ my $uname;
|
||||
my $serv = hostname;
|
||||
my $pid;
|
||||
|
||||
-if (! $debug)
|
||||
+if (! $nofork)
|
||||
{
|
||||
$pid = fork();
|
||||
}
|
||||
|
||||
-if ((!$debug) && (not defined $pid))
|
||||
+if ((!$nofork) && (not defined $pid))
|
||||
{
|
||||
print "resources not avilable.\n";
|
||||
}
|
||||
@@ -128,7 +130,7 @@ elsif ($pid == 0 )
|
||||
my $superenice_idle=$Config->param("superenicer.idle-nice-level");
|
||||
my $superenice_ignoredusers=$Config->param("superenicer.ignored-users");
|
||||
|
||||
- if ( ! $debug )
|
||||
+ if ( ! $nofork )
|
||||
{
|
||||
# close any open file descriptor left open by our parent before the fork
|
||||
my $fd;
|
||||
@@ -377,7 +379,8 @@ x2gocleansessions [options]
|
||||
Options:
|
||||
--help|-h|-? brief help message
|
||||
--man full documentation
|
||||
- --debug|-d enable debugging and don't daemonize
|
||||
+ --debug|-d enable debugging; implies --nofork
|
||||
+ --nofork|-n don't daemonize
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -393,8 +396,11 @@ Prints the manual page and exits.
|
||||
|
||||
=item B<--debug>|B<-d>
|
||||
|
||||
-Override debugging setting in global config and keep application in foreground
|
||||
-instead of daemonizing.
|
||||
+Override debugging setting in global config; implies B<--nofork>.
|
||||
+
|
||||
+=item B<--nofork>|B<-n>
|
||||
+
|
||||
+Keep application in foreground instead of daemonizing.
|
||||
|
||||
=back
|
||||
|
|
@ -1,13 +1,17 @@
|
|||
# Template file for 'x2goserver'
|
||||
pkgname=x2goserver
|
||||
version=4.1.0.3
|
||||
revision=1
|
||||
revision=2
|
||||
build_style=gnu-makefile
|
||||
hostmakedepends="pkg-config perl"
|
||||
make_install_args="SBINDIR=/usr/bin"
|
||||
make_build_args="PREFIX=/usr"
|
||||
hostmakedepends="pkg-config perl which"
|
||||
makedepends="libssh2-devel"
|
||||
depends="perl perl-Config-Simple perl-DBI perl-Capture-Tiny perl-DBD-SQLite bash iproute2 makepasswd openssh lsof xauth perl-File-BaseDir nx-libs perl-File-Which"
|
||||
depends="bash iproute2 openssh lsof xauth xhost xwininfo psmisc xkeyboard-config
|
||||
perl-Config-Simple perl-DBI perl-Capture-Tiny perl-DBD-SQLite perl-File-BaseDir
|
||||
perl-File-Which perl-Try-Tiny perl-Switch nx-libs"
|
||||
short_desc="Open source graphical Remote Desktop based on NX technology"
|
||||
maintainer="eoli3n <jkirsz@gmail.com>"
|
||||
maintainer="eoli3n <jonathan.kirszling@runbox.com>"
|
||||
license="GPL-2.0-or-later"
|
||||
homepage="http://www.x2go.org"
|
||||
distfiles="http://code.x2go.org/releases/source/${pkgname}/${pkgname}-${version}.tar.gz"
|
||||
|
@ -15,14 +19,16 @@ checksum=6776aaa354f5a44e349f0b3c176d4988c88a618c2edf46c98a37ae89c069dcd0
|
|||
system_groups="x2gouser"
|
||||
system_accounts="x2gouser"
|
||||
x2gouser_homedir="/var/lib/x2go"
|
||||
x2gouser_shell="/bin/false"
|
||||
patch_args="-Np1"
|
||||
conf_files="
|
||||
/etc/x2go/desktopsharing/*
|
||||
/etc/x2go/x2gosql/*
|
||||
/etc/x2go/keystrokes.cfg
|
||||
/etc/x2go/x2goagent.*
|
||||
/etc/x2go/x2goserver.*
|
||||
"
|
||||
|
||||
post_extract() {
|
||||
# Replace hard-coded /usr/sbin
|
||||
for _file in x2goserver-printing/Makefile x2goserver/Makefile x2goserver-xsession/Makefile libx2go-server-db-perl/Makefile x2goserver-common/Makefile; do
|
||||
vsed -e 's,/sbin,/bin,g' -i "$_file"
|
||||
done
|
||||
for _file in bin/x2golistdesktops bin/x2goresume-session bin/x2gostartagent sbin/x2gocleansessions; do
|
||||
vsed -e 's,/usr/sbin,/usr/bin,g' -i x2goserver/"$_file"
|
||||
done
|
||||
post_install() {
|
||||
rm -rf "${DESTDIR}/etc/logcheck"
|
||||
vsv x2gocleansessions
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue