summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2020-05-10 12:53:37 +0000
committerdakkar <dakkar@thenautilus.net>2020-05-10 12:53:37 +0000
commit8d88bacd7218cb2cf6f5179fdd58517f25e6eeaa (patch)
tree0843e51ad6788b5f0ae7f0f122b2aaaea67bf2c2
parentcpanfile (diff)
downloadHomePanel-8d88bacd7218cb2cf6f5179fdd58517f25e6eeaa.tar.gz
HomePanel-8d88bacd7218cb2cf6f5179fdd58517f25e6eeaa.tar.bz2
HomePanel-8d88bacd7218cb2cf6f5179fdd58517f25e6eeaa.zip
openrc scriptHEADmaster
-rwxr-xr-xhomepanel.openrc33
1 files changed, 33 insertions, 0 deletions
diff --git a/homepanel.openrc b/homepanel.openrc
new file mode 100755
index 0000000..7952fa4
--- /dev/null
+++ b/homepanel.openrc
@@ -0,0 +1,33 @@
+#!/sbin/openrc-run
+
+thisdir="$(dirname "$(readlink -f "$1")")"
+homepanel_config_file="${thisdir}/homepanel.conf"
+
+description="Home info panel"
+command="/usr/bin/env PERL5LIB='/home/dakkar/.perlbrew/libs/perl-5.30.2@HomePanel/lib/perl5' 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:/bin:/usr/bin' ${thisdir}/driver-async.pl"
+command_args="$homepanel_config_file"
+pidfile="${thisdir}/homepanel.pid"
+command_background=true
+command_user=dakkar
+output_log="${thisdir}/homepanel.out"
+error_log="${thisdir}/homepanel.err"
+directory="$thisdir"
+name="HomePanel"
+procname="perl"
+
+depend() {
+ need localmount net
+ after bootmisc
+}
+
+start_pre() {
+ local forecast_key output_file
+ . $homepanel_config_file
+ local dest_dir="$(dirname "$output_file")"
+ local fstype="$(stat -f -c %T "$dest_dir")"
+ if [[ "$fstype" != tmpfs ]]; then
+ mkdir -p "$dest_dir"
+ mount -t tmpfs none "$dest_dir"
+ cp -a "$thisdir/icons" "$dest_dir/"
+ fi
+}