diff --git a/packaging/Makefile b/packaging/Makefile index e37ec20..8e11fd5 100644 --- a/packaging/Makefile +++ b/packaging/Makefile @@ -1,4 +1,4 @@ -PLATFORMS = alpine_3.6 centos_6 centos_7 debian_9 ubuntu_14 ubuntu_16 +PLATFORMS = alpine_3.6 centos_6 centos_7 debian_9 .PHONY : main main : @@ -23,7 +23,7 @@ clean-${platform} : deepclean-${platform} : $${MAKE} -j 1 -C ${platform} deepclean - + make-vm-${platform} : $${MAKE} -j 1 -C ${platform} .vm-is-running endef @@ -44,4 +44,4 @@ clean : $(patsubst %,clean-%,${PLATFORMS}) rm -rf results .PHONY : deepclean -deepclean : $(patsubst %,deepclean-%,${PLATFORMS}) \ No newline at end of file +deepclean : $(patsubst %,deepclean-%,${PLATFORMS}) diff --git a/packaging/debian_9/debian-pkg/changelog b/packaging/debian_9/debian-pkg/changelog index ce42c9a..2aadacf 100644 --- a/packaging/debian_9/debian-pkg/changelog +++ b/packaging/debian_9/debian-pkg/changelog @@ -1,26 +1,14 @@ -jobber (1.3.3) UNRELEASED; urgency=low +jobber (1.3.3-1) UNRELEASED; urgency=low * Release 1.3.3 -- C. Dylan Shearer Sat, 25 Aug 2018 13:25:00 -0800 - jobber (1.3.3-pr.2-1) UNRELEASED; urgency=low +jobber (1.3.2-1) UNRELEASED; urgency=low - * Release 1.3.3-pr.2 + * Release 1.3.2 - -- C. Dylan Shearer Sat, 10 June 2018 10:42:00 -0800 - -jobber (1.3.3-pr.1-1) UNRELEASED; urgency=low - - * Release 1.3.3-pr.1 - - -- C. Dylan Shearer Sat, 28 May 2018 10:22:00 -0800 - - jobber (1.3.2-1) UNRELEASED; urgency=low - - * Release 1.3.2 - - -- C. Dylan Shearer Sat, 24 Feb 2018 12:40:00 -0800 + -- C. Dylan Shearer Sat, 24 Feb 2018 12:40:00 -0800 jobber (1.3.1-1) UNRELEASED; urgency=low diff --git a/packaging/debian_9/debian-pkg/copyright b/packaging/debian_9/debian-pkg/copyright index 1eaf2df..ad6807c 100644 --- a/packaging/debian_9/debian-pkg/copyright +++ b/packaging/debian_9/debian-pkg/copyright @@ -3,7 +3,7 @@ Upstream-Name: jobber Source: https://github.com/dshearer/jobber Files: * -Copyright: 2014-2016 C. Dylan Shearer +Copyright: 2014-2018 C. Dylan Shearer License: MIT License: MIT @@ -21,8 +21,8 @@ License: MIT OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # Please also look if there are files or directories which have a diff --git a/packaging/tail.mk b/packaging/tail.mk index 5da7710..8745c55 100644 --- a/packaging/tail.mk +++ b/packaging/tail.mk @@ -141,7 +141,6 @@ clean-common : deepclean : clean-common -vagrant destroy -f rm -f .vm-is-created - .PHONY : shallowclean .PHONY : shallowclean shallowclean : diff --git a/packaging/ubuntu_14/debian-pkg/changelog b/packaging/ubuntu_14/debian-pkg/changelog deleted file mode 100644 index ce42c9a..0000000 --- a/packaging/ubuntu_14/debian-pkg/changelog +++ /dev/null @@ -1,54 +0,0 @@ -jobber (1.3.3) UNRELEASED; urgency=low - - * Release 1.3.3 - - -- C. Dylan Shearer Sat, 25 Aug 2018 13:25:00 -0800 - - jobber (1.3.3-pr.2-1) UNRELEASED; urgency=low - - * Release 1.3.3-pr.2 - - -- C. Dylan Shearer Sat, 10 June 2018 10:42:00 -0800 - -jobber (1.3.3-pr.1-1) UNRELEASED; urgency=low - - * Release 1.3.3-pr.1 - - -- C. Dylan Shearer Sat, 28 May 2018 10:22:00 -0800 - - jobber (1.3.2-1) UNRELEASED; urgency=low - - * Release 1.3.2 - - -- C. Dylan Shearer Sat, 24 Feb 2018 12:40:00 -0800 - -jobber (1.3.1-1) UNRELEASED; urgency=low - - * Release 1.3.1 - - -- C. Dylan Shearer Sun, 3 Feb 2018 15:48:00 -0800 - -jobber (1.3.0-1) UNRELEASED; urgency=low - - * Release 1.3.0 - - -- C. Dylan Shearer Sun, 28 Jan 2018 20:02:00 -0800 - -jobber (1.3.0-pr.1-1) UNRELEASED; urgency=low - - * Release 1.3.0-pr.1 - - -- C. Dylan Shearer Sat, 13 Jan 2018 10:47:00 -0800 - -jobber (1.2.1-1) UNRELEASED; urgency=low - - * Release 1.2.1 - - -- C. Dylan Shearer Fri, 28 Dec 2017 18:50:00 -0800 - -jobber (1.2-1) UNRELEASED; urgency=low - - * Initial release (Closes: #nnnn) - * Release 1.2 - - -- C. Dylan Shearer Wed, 3 May 2017 16:26:07 -0700 diff --git a/packaging/ubuntu_14/debian-pkg/changelog b/packaging/ubuntu_14/debian-pkg/changelog new file mode 120000 index 0000000..f3c2d92 --- /dev/null +++ b/packaging/ubuntu_14/debian-pkg/changelog @@ -0,0 +1 @@ +../../debian_9/debian-pkg/changelog \ No newline at end of file diff --git a/packaging/ubuntu_14/debian-pkg/copyright b/packaging/ubuntu_14/debian-pkg/copyright deleted file mode 100644 index 1eaf2df..0000000 --- a/packaging/ubuntu_14/debian-pkg/copyright +++ /dev/null @@ -1,31 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: jobber -Source: https://github.com/dshearer/jobber - -Files: * -Copyright: 2014-2016 C. Dylan Shearer -License: MIT - -License: MIT - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - . - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -# Please also look if there are files or directories which have a -# different copyright/license attached and list them here. -# Please avoid to pick license terms that are more restrictive than the -# packaged work, as it may make Debian's contributions unacceptable upstream. diff --git a/packaging/ubuntu_14/debian-pkg/copyright b/packaging/ubuntu_14/debian-pkg/copyright new file mode 120000 index 0000000..1537a0c --- /dev/null +++ b/packaging/ubuntu_14/debian-pkg/copyright @@ -0,0 +1 @@ +../../debian_9/debian-pkg/copyright \ No newline at end of file diff --git a/packaging/ubuntu_14/debian-pkg/jobber.init b/packaging/ubuntu_14/debian-pkg/jobber.init deleted file mode 100644 index 23ee042..0000000 --- a/packaging/ubuntu_14/debian-pkg/jobber.init +++ /dev/null @@ -1,164 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: jobber -# Required-Start: $local_fs $remote_fs $syslog -# Required-Stop: $local_fs $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: jobber -# Description: replacement for cron, with sophisticated status-reporting and error-handling -### END INIT INFO - -# Author: C. Dylan Shearer - -# Do NOT "set -e" - -# PATH should only include /usr/* if it runs after the mountnfs.sh script -PATH=/sbin:/bin -DESC="jobber" -NAME=jobbermaster -DAEMON=/usr/libexec/jobbermaster -DAEMON_ARGS="" -PIDFILE=/var/run/$NAME.pid -SCRIPTNAME=/etc/init.d/$NAME - -# Exit if the package is not installed -[ -x "$DAEMON" ] || exit 0 - -# Read configuration variable file if it is present -[ -r /etc/default/$NAME ] && . /etc/default/$NAME - -# Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh - -# Define LSB log_* functions. -# Depend on lsb-base (>= 3.2-14) to ensure that this file is present -# and status_of_proc is working. -. /lib/lsb/init-functions - -# -# Function that starts the daemon/service -# -do_start() -{ - # Return - # 0 if daemon has been started - # 1 if daemon was already running - # 2 if daemon could not be started - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ - || return 1 - start-stop-daemon -b --make-pidfile --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ - $DAEMON_ARGS \ - || return 2 - # The above code will not work for interpreted scripts, use the next - # six lines below instead (Ref: #643337, start-stop-daemon(8) ) - #start-stop-daemon --start --quiet --pidfile $PIDFILE --startas $DAEMON \ - # --name $NAME --test > /dev/null \ - # || return 1 - #start-stop-daemon --start --quiet --pidfile $PIDFILE --startas $DAEMON \ - # --name $NAME -- $DAEMON_ARGS \ - # || return 2 - - # Add code here, if necessary, that waits for the process to be ready - # to handle requests from services started subsequently which depend - # on this one. As a last resort, sleep for some time. -} - -# -# Function that stops the daemon/service -# -do_stop() -{ - # Return - # 0 if daemon has been stopped - # 1 if daemon was already stopped - # 2 if daemon could not be stopped - # other if a failure occurred - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME - RETVAL="$?" - [ "$RETVAL" = 2 ] && return 2 - # Wait for children to finish too if this is a daemon that forks - # and if the daemon is only ever run from this initscript. - # If the above conditions are not satisfied then add some other code - # that waits for the process to drop all resources that could be - # needed by services started subsequently. A last resort is to - # sleep for some time. - #start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON - #[ "$?" = 2 ] && return 2 - # Many daemons don't delete their pidfiles when they exit. - rm -f $PIDFILE - return "$RETVAL" -} - -# -# Function that sends a SIGHUP to the daemon/service -# -#do_reload() { -# # -# # If the daemon can reload its configuration without -# # restarting (for example, when it is sent a SIGHUP), -# # then implement that here. -# # -# start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME -# return 0 -#} - -case "$1" in - start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" - do_start - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - stop) - [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" - do_stop - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - status) - status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? - ;; - #reload|force-reload) - # - # If do_reload() is not implemented then leave this commented out - # and leave 'force-reload' as an alias for 'restart'. - # - #log_daemon_msg "Reloading $DESC" "$NAME" - #do_reload - #log_end_msg $? - #;; - restart|force-reload) - # - # If the "reload" option is implemented then remove the - # 'force-reload' alias - # - log_daemon_msg "Restarting $DESC" "$NAME" - do_stop - case "$?" in - 0|1) - do_start - case "$?" in - 0) log_end_msg 0 ;; - 1) log_end_msg 1 ;; # Old process is still running - *) log_end_msg 1 ;; # Failed to start - esac - ;; - *) - # Failed to stop - log_end_msg 1 - ;; - esac - ;; - *) - #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 - exit 3 - ;; -esac - -: diff --git a/packaging/ubuntu_14/debian-pkg/jobber.init b/packaging/ubuntu_14/debian-pkg/jobber.init new file mode 120000 index 0000000..cf87ced --- /dev/null +++ b/packaging/ubuntu_14/debian-pkg/jobber.init @@ -0,0 +1 @@ +../../debian_9/debian-pkg/jobber.init \ No newline at end of file diff --git a/packaging/ubuntu_14/debian-pkg/jobber.service b/packaging/ubuntu_14/debian-pkg/jobber.service deleted file mode 100644 index be16e81..0000000 --- a/packaging/ubuntu_14/debian-pkg/jobber.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Replacement for cron, with sophisticated status-reporting and error-handling -After=syslog.target - -[Service] -Type=simple -ExecStart=/usr/libexec/jobbermaster - -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/packaging/ubuntu_14/debian-pkg/jobber.service b/packaging/ubuntu_14/debian-pkg/jobber.service new file mode 120000 index 0000000..fe0ff05 --- /dev/null +++ b/packaging/ubuntu_14/debian-pkg/jobber.service @@ -0,0 +1 @@ +../../debian_9/debian-pkg/jobber.service \ No newline at end of file diff --git a/packaging/ubuntu_14/debian-pkg/rules b/packaging/ubuntu_14/debian-pkg/rules deleted file mode 100644 index fe6dc7e..0000000 --- a/packaging/ubuntu_14/debian-pkg/rules +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/make -f -# See debhelper(7) (uncomment to enable) -# output every command that modifies files on the build system. -DH_VERBOSE = 0 -#export DH_OPTIONS=-v - -# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* -DPKG_EXPORT_BUILDFLAGS = 1 -include /usr/share/dpkg/default.mk - -# see FEATURE AREAS in dpkg-buildflags(1) -#export DEB_BUILD_MAINT_OPTIONS = hardening=+all - -# see ENVIRONMENT in dpkg-buildflags(1) -# package maintainers to append CFLAGS -#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic -# package maintainers to append LDFLAGS -#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed - -SRC_DIR = ${PWD} -GO_WKSPC = /tmp/workspace -export GOPATH=${GO_WKSPC} - -# main packaging script based on dh7 syntax -%: - dh $@ --with=systemd - -override_dh_auto_build: - # make Go workspace - mkdir -p "${GO_WKSPC}/src/github.com/dshearer" - ln -s "${SRC_DIR}" "${GO_WKSPC}/src/github.com/dshearer/jobber" - dh_auto_build -- "GO_WKSPC=${GO_WKSPC}" - -override_dh_auto_test: - dh_auto_test -- "GO_WKSPC=${GO_WKSPC}" - -override_dh_auto_install: - dh_auto_install -- "GO_WKSPC=${GO_WKSPC}" prefix=/usr - -override_dh_auto_clean: - rm -rf "${GO_WKSPC}" - -override_dh_systemd_start: - dh_systemd_start --restart-after-upgrade diff --git a/packaging/ubuntu_14/debian-pkg/rules b/packaging/ubuntu_14/debian-pkg/rules new file mode 120000 index 0000000..4809b8c --- /dev/null +++ b/packaging/ubuntu_14/debian-pkg/rules @@ -0,0 +1 @@ +../../debian_9/debian-pkg/rules \ No newline at end of file diff --git a/packaging/ubuntu_16/debian-pkg/changelog b/packaging/ubuntu_16/debian-pkg/changelog deleted file mode 100644 index ce42c9a..0000000 --- a/packaging/ubuntu_16/debian-pkg/changelog +++ /dev/null @@ -1,54 +0,0 @@ -jobber (1.3.3) UNRELEASED; urgency=low - - * Release 1.3.3 - - -- C. Dylan Shearer Sat, 25 Aug 2018 13:25:00 -0800 - - jobber (1.3.3-pr.2-1) UNRELEASED; urgency=low - - * Release 1.3.3-pr.2 - - -- C. Dylan Shearer Sat, 10 June 2018 10:42:00 -0800 - -jobber (1.3.3-pr.1-1) UNRELEASED; urgency=low - - * Release 1.3.3-pr.1 - - -- C. Dylan Shearer Sat, 28 May 2018 10:22:00 -0800 - - jobber (1.3.2-1) UNRELEASED; urgency=low - - * Release 1.3.2 - - -- C. Dylan Shearer Sat, 24 Feb 2018 12:40:00 -0800 - -jobber (1.3.1-1) UNRELEASED; urgency=low - - * Release 1.3.1 - - -- C. Dylan Shearer Sun, 3 Feb 2018 15:48:00 -0800 - -jobber (1.3.0-1) UNRELEASED; urgency=low - - * Release 1.3.0 - - -- C. Dylan Shearer Sun, 28 Jan 2018 20:02:00 -0800 - -jobber (1.3.0-pr.1-1) UNRELEASED; urgency=low - - * Release 1.3.0-pr.1 - - -- C. Dylan Shearer Sat, 13 Jan 2018 10:47:00 -0800 - -jobber (1.2.1-1) UNRELEASED; urgency=low - - * Release 1.2.1 - - -- C. Dylan Shearer Fri, 28 Dec 2017 18:50:00 -0800 - -jobber (1.2-1) UNRELEASED; urgency=low - - * Initial release (Closes: #nnnn) - * Release 1.2 - - -- C. Dylan Shearer Wed, 3 May 2017 16:26:07 -0700 diff --git a/packaging/ubuntu_16/debian-pkg/changelog b/packaging/ubuntu_16/debian-pkg/changelog new file mode 120000 index 0000000..f3c2d92 --- /dev/null +++ b/packaging/ubuntu_16/debian-pkg/changelog @@ -0,0 +1 @@ +../../debian_9/debian-pkg/changelog \ No newline at end of file diff --git a/packaging/ubuntu_16/debian-pkg/copyright b/packaging/ubuntu_16/debian-pkg/copyright deleted file mode 100644 index 1eaf2df..0000000 --- a/packaging/ubuntu_16/debian-pkg/copyright +++ /dev/null @@ -1,31 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: jobber -Source: https://github.com/dshearer/jobber - -Files: * -Copyright: 2014-2016 C. Dylan Shearer -License: MIT - -License: MIT - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - . - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -# Please also look if there are files or directories which have a -# different copyright/license attached and list them here. -# Please avoid to pick license terms that are more restrictive than the -# packaged work, as it may make Debian's contributions unacceptable upstream. diff --git a/packaging/ubuntu_16/debian-pkg/copyright b/packaging/ubuntu_16/debian-pkg/copyright new file mode 120000 index 0000000..1537a0c --- /dev/null +++ b/packaging/ubuntu_16/debian-pkg/copyright @@ -0,0 +1 @@ +../../debian_9/debian-pkg/copyright \ No newline at end of file diff --git a/packaging/ubuntu_16/debian-pkg/jobber.init b/packaging/ubuntu_16/debian-pkg/jobber.init deleted file mode 100644 index 23ee042..0000000 --- a/packaging/ubuntu_16/debian-pkg/jobber.init +++ /dev/null @@ -1,164 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: jobber -# Required-Start: $local_fs $remote_fs $syslog -# Required-Stop: $local_fs $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: jobber -# Description: replacement for cron, with sophisticated status-reporting and error-handling -### END INIT INFO - -# Author: C. Dylan Shearer - -# Do NOT "set -e" - -# PATH should only include /usr/* if it runs after the mountnfs.sh script -PATH=/sbin:/bin -DESC="jobber" -NAME=jobbermaster -DAEMON=/usr/libexec/jobbermaster -DAEMON_ARGS="" -PIDFILE=/var/run/$NAME.pid -SCRIPTNAME=/etc/init.d/$NAME - -# Exit if the package is not installed -[ -x "$DAEMON" ] || exit 0 - -# Read configuration variable file if it is present -[ -r /etc/default/$NAME ] && . /etc/default/$NAME - -# Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh - -# Define LSB log_* functions. -# Depend on lsb-base (>= 3.2-14) to ensure that this file is present -# and status_of_proc is working. -. /lib/lsb/init-functions - -# -# Function that starts the daemon/service -# -do_start() -{ - # Return - # 0 if daemon has been started - # 1 if daemon was already running - # 2 if daemon could not be started - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ - || return 1 - start-stop-daemon -b --make-pidfile --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ - $DAEMON_ARGS \ - || return 2 - # The above code will not work for interpreted scripts, use the next - # six lines below instead (Ref: #643337, start-stop-daemon(8) ) - #start-stop-daemon --start --quiet --pidfile $PIDFILE --startas $DAEMON \ - # --name $NAME --test > /dev/null \ - # || return 1 - #start-stop-daemon --start --quiet --pidfile $PIDFILE --startas $DAEMON \ - # --name $NAME -- $DAEMON_ARGS \ - # || return 2 - - # Add code here, if necessary, that waits for the process to be ready - # to handle requests from services started subsequently which depend - # on this one. As a last resort, sleep for some time. -} - -# -# Function that stops the daemon/service -# -do_stop() -{ - # Return - # 0 if daemon has been stopped - # 1 if daemon was already stopped - # 2 if daemon could not be stopped - # other if a failure occurred - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME - RETVAL="$?" - [ "$RETVAL" = 2 ] && return 2 - # Wait for children to finish too if this is a daemon that forks - # and if the daemon is only ever run from this initscript. - # If the above conditions are not satisfied then add some other code - # that waits for the process to drop all resources that could be - # needed by services started subsequently. A last resort is to - # sleep for some time. - #start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON - #[ "$?" = 2 ] && return 2 - # Many daemons don't delete their pidfiles when they exit. - rm -f $PIDFILE - return "$RETVAL" -} - -# -# Function that sends a SIGHUP to the daemon/service -# -#do_reload() { -# # -# # If the daemon can reload its configuration without -# # restarting (for example, when it is sent a SIGHUP), -# # then implement that here. -# # -# start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME -# return 0 -#} - -case "$1" in - start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" - do_start - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - stop) - [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" - do_stop - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - status) - status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? - ;; - #reload|force-reload) - # - # If do_reload() is not implemented then leave this commented out - # and leave 'force-reload' as an alias for 'restart'. - # - #log_daemon_msg "Reloading $DESC" "$NAME" - #do_reload - #log_end_msg $? - #;; - restart|force-reload) - # - # If the "reload" option is implemented then remove the - # 'force-reload' alias - # - log_daemon_msg "Restarting $DESC" "$NAME" - do_stop - case "$?" in - 0|1) - do_start - case "$?" in - 0) log_end_msg 0 ;; - 1) log_end_msg 1 ;; # Old process is still running - *) log_end_msg 1 ;; # Failed to start - esac - ;; - *) - # Failed to stop - log_end_msg 1 - ;; - esac - ;; - *) - #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 - exit 3 - ;; -esac - -: diff --git a/packaging/ubuntu_16/debian-pkg/jobber.init b/packaging/ubuntu_16/debian-pkg/jobber.init new file mode 120000 index 0000000..cf87ced --- /dev/null +++ b/packaging/ubuntu_16/debian-pkg/jobber.init @@ -0,0 +1 @@ +../../debian_9/debian-pkg/jobber.init \ No newline at end of file diff --git a/packaging/ubuntu_16/debian-pkg/jobber.service b/packaging/ubuntu_16/debian-pkg/jobber.service deleted file mode 100644 index be16e81..0000000 --- a/packaging/ubuntu_16/debian-pkg/jobber.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Replacement for cron, with sophisticated status-reporting and error-handling -After=syslog.target - -[Service] -Type=simple -ExecStart=/usr/libexec/jobbermaster - -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/packaging/ubuntu_16/debian-pkg/jobber.service b/packaging/ubuntu_16/debian-pkg/jobber.service new file mode 120000 index 0000000..fe0ff05 --- /dev/null +++ b/packaging/ubuntu_16/debian-pkg/jobber.service @@ -0,0 +1 @@ +../../debian_9/debian-pkg/jobber.service \ No newline at end of file diff --git a/packaging/ubuntu_16/debian-pkg/rules b/packaging/ubuntu_16/debian-pkg/rules deleted file mode 100644 index fe6dc7e..0000000 --- a/packaging/ubuntu_16/debian-pkg/rules +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/make -f -# See debhelper(7) (uncomment to enable) -# output every command that modifies files on the build system. -DH_VERBOSE = 0 -#export DH_OPTIONS=-v - -# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* -DPKG_EXPORT_BUILDFLAGS = 1 -include /usr/share/dpkg/default.mk - -# see FEATURE AREAS in dpkg-buildflags(1) -#export DEB_BUILD_MAINT_OPTIONS = hardening=+all - -# see ENVIRONMENT in dpkg-buildflags(1) -# package maintainers to append CFLAGS -#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic -# package maintainers to append LDFLAGS -#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed - -SRC_DIR = ${PWD} -GO_WKSPC = /tmp/workspace -export GOPATH=${GO_WKSPC} - -# main packaging script based on dh7 syntax -%: - dh $@ --with=systemd - -override_dh_auto_build: - # make Go workspace - mkdir -p "${GO_WKSPC}/src/github.com/dshearer" - ln -s "${SRC_DIR}" "${GO_WKSPC}/src/github.com/dshearer/jobber" - dh_auto_build -- "GO_WKSPC=${GO_WKSPC}" - -override_dh_auto_test: - dh_auto_test -- "GO_WKSPC=${GO_WKSPC}" - -override_dh_auto_install: - dh_auto_install -- "GO_WKSPC=${GO_WKSPC}" prefix=/usr - -override_dh_auto_clean: - rm -rf "${GO_WKSPC}" - -override_dh_systemd_start: - dh_systemd_start --restart-after-upgrade diff --git a/packaging/ubuntu_16/debian-pkg/rules b/packaging/ubuntu_16/debian-pkg/rules new file mode 120000 index 0000000..4809b8c --- /dev/null +++ b/packaging/ubuntu_16/debian-pkg/rules @@ -0,0 +1 @@ +../../debian_9/debian-pkg/rules \ No newline at end of file