From 4a46c1031aa69e7ba0e309ba9692250f14dba6b8 Mon Sep 17 00:00:00 2001 From: dakkar Date: Sat, 9 Dec 2023 14:02:41 +0000 Subject: actually async --- homepanel-control | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100755 homepanel-control (limited to 'homepanel-control') diff --git a/homepanel-control b/homepanel-control deleted file mode 100755 index f8a20ad..0000000 --- a/homepanel-control +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env perl -use strict; -use warnings; -use Daemon::Control; -use Path::Tiny; -use Config::Any; - -my $basedir = path(__FILE__)->parent->realpath; - -my $config_file = $basedir->child('homepanel.conf'); -my $cfg_set = Config::Any->load_files({ - files => [$config_file], - use_ext => 1, -}); -my %config = map { %{(values %$_)[0]} } @$cfg_set; -my $dest_dir = path($config{output_file})->parent->realpath; -my $icons = $basedir->child('icons'); - -exit Daemon::Control->new( - init_code => <<"INIT", -if [ ! -d $dest_dir/icons ]; then - mkdir -p $dest_dir - mount -t tmpfs none $dest_dir - cp -a $icons $dest_dir/ -fi - -export PERL5LIB="/home/dakkar/.perlbrew/libs/perl-5.30.2\@HomePanel/lib/perl5" -export PATH="/home/dakkar/.perlbrew/libs/perl-5.30.2\@HomePanel/bin:/home/dakkar/perl5/perlbrew/bin:/home/dakkar/perl5/perlbrew/perls/perl-5.30.2/bin:\$PATH" -INIT - - name => "HomePanel", - lsb_sdesc => 'Home info panel', - lsb_desc => 'Show forecast, tube, bus status.', - path => path(__FILE__)->realpath, - - program => $basedir->child('driver-async.pl'), - program_args => [ $config_file ], - - user => 'dakkar', - group => 'users', - directory => $basedir, - - pid_file => $basedir->child('homepanel.pid'), - stderr_file => $basedir->child('homepanel.err'), - stdout_file => $basedir->child('homepanel.out'), - - fork => 2, - -)->run; -- cgit v1.2.3