# HG changeset patch # User Hans-G?nter Theisgen # Date 1665567371 -3600 # Node ID 24fe92acc96d1db457706ca88769e11d09580e99 # Parent 50e162af45ee66817276ae82dc8559b77dcd1be7 created recipe for get-java8-jre diff -r 50e162af45ee -r 24fe92acc96d dnsmasq/stuff/etc/init.d/dnsmasq --- a/dnsmasq/stuff/etc/init.d/dnsmasq Tue Oct 11 07:33:58 2022 +0000 +++ b/dnsmasq/stuff/etc/init.d/dnsmasq Wed Oct 12 10:36:11 2022 +0100 @@ -1,6 +1,6 @@ #!/bin/sh -# /etc/init.d/dnsmasq: Start, stop and restart DNSmasq daemon on SliTaz, at boot -# time or with the command line. +# /etc/init.d/dnsmasq: Start, stop and restart DNSmasq daemon on SliTaz +# at boot time or with command. # # To start daemon at boot time, just put the right name in the $RUN_DAEMONS # variable of /etc/rcS.conf and configure options with /etc/daemons.conf. @@ -15,42 +15,43 @@ PIDFILE=/var/run/dnsmasq.pid case "$1" in - start) - if active_pidfile $PIDFILE dnsmasq ; then - _ '%s is already running.' $NAME - exit 1 - fi - action 'Starting %s: %s...' "$DESC" $NAME - $DAEMON $OPTIONS - status - ;; - stop) - if ! active_pidfile $PIDFILE dnsmasq ; then - _ '%s is not running.' $NAME - exit 1 - fi - action 'Stopping %s: %s...' "$DESC" $NAME - kill $(cat $PIDFILE) - rm $PIDFILE - status - ;; - restart) - if ! active_pidfile $PIDFILE dnsmasq ; then - _ '%s is not running.' $NAME - exit 1 - fi - action 'Restarting %s: %s...' "$DESC" $NAME - kill $(cat $PIDFILE) - rm $PIDFILE - sleep 2 - $DAEMON $OPTIONS - status - ;; - *) - emsg "$(_ 'Usage:') $0 [start|stop|restart]" - newline - exit 1 - ;; + (start) + if active_pidfile $PIDFILE dnsmasq + then + _ '%s is already running.' $NAME + exit 1 + fi + action 'Starting %s: %s...' "$DESC" $NAME + $DAEMON $OPTIONS + status + ;; + (stop) + if ! active_pidfile $PIDFILE dnsmasq + then + _ '%s is not running.' $NAME + exit 1 + fi + action 'Stopping %s: %s...' "$DESC" $NAME + kill $(cat $PIDFILE) + status + ;; + (restart) + if ! active_pidfile $PIDFILE dnsmasq + then + _ '%s is not running.' $NAME + exit 1 + fi + action 'Restarting %s: %s...' "$DESC" $NAME + kill $(cat $PIDFILE) + sleep 2 + $DAEMON $OPTIONS + status + ;; + (*) + emsg "$(_ 'Usage:') $0 [start|stop|restart]" + newline + exit 1 + ;; esac exit 0 diff -r 50e162af45ee -r 24fe92acc96d get-java8-jre/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/get-java8-jre/receipt Wed Oct 12 10:36:11 2022 +0100 @@ -0,0 +1,17 @@ +# SliTaz package receipt. + +PACKAGE="get-java8-jre" +VERSION="1.00" +CATEGORY="non-free" +SHORT_DESC="Oracle Java Runtime Environment" +MAINTAINER="maintainer@slitaz.org" +LICENSE="GPL3" +WEB_SITE="https://www.java.com" +TAGS="java" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/bin + cp -a stuff/get-java8-jre $fs/usr/bin +} diff -r 50e162af45ee -r 24fe92acc96d get-java8-jre/stuff/get-java8-jre --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/get-java8-jre/stuff/get-java8-jre Wed Oct 12 10:36:11 2022 +0100 @@ -0,0 +1,243 @@ +#!/bin/sh +# +# get-java8-jre - create and install SliTaz package jre +# +# (C) 2022 SliTaz - GNU General Public License v3. +# Author : HGT 2022-10-12 +# + +# === Initialisations === + +PKGS_DB="/var/lib/tazpkg" # packages database directory +PACKAGE="jre" +CATEGORY="non-free" +TAGS="java" +SHORT_DESC="Oracle Java Runtime Environment." +MAINTAINER="nobody@slitaz.org" +LICENSE="non-free" +WEB_SITE="https://www.java.com/" +DEPENDS="" + +# Declare functions check_root, status, ... +. /lib/libtaz.sh +# and make commandline options (if any) available as variables + +is_installed() +{ + if [ -d $ROOT$PKGS_DB/installed/$PACKAGE ] + then #package is deemed to be installed + return 0 + else + return 1 + fi +} + +# Show commandline options, if requested by --help +if [ "$help" == "yes" ] + then + echo "Commandline options: + $0 + --version= + --root= + --install=yes|no + --keep=no|yes + --tmpdir= + --logfile=" + exit +fi + +# Check for system administrator privileges +check_root + +title "Package $PACKAGE will be build as SliTaz package and installed" + +# Fetch latest version +# unless version is set by option --version +[ -z "$version" ] && version="latest" + +# Install SliTaz package +# unless inhibited by option --install=no +[ -z "$install" ] && install="yes" + +# Delete SliTaz package file $PACKAGE-$VERSION.tazpkg after installation, +# unless option --keep=yes is given +[ -z "$keep" ] && keep="no" + +# Directory for temporary files +TMP_DIR="$tmpdir" +[ -z "$tmpdir" ] && TMP_DIR="/tmp/get-$PACKAGE" + +# Logging file (unused by now) +LOG="$logfile" +[ -z "$logfile" ] && LOG=$TMP_DIR/get-$PACKAGE.log + +cat < fs/usr/share/applications/jcontrol.desktop < receipt <