code cleanup and openrc script

This commit is contained in:
2020-08-05 21:15:32 -04:00
parent fb70d11f2b
commit 6b771cfa98
28 changed files with 2043 additions and 1572 deletions

View File

@@ -0,0 +1,19 @@
openrc_config_data = configuration_data()
openrc_config_data.set('SBINDIR', join_paths(get_option('prefix'), get_option('sbindir')))
openrc_config_data.set('LIBEXECDIR', join_paths(get_option('prefix'), get_option('libexecdir'), meson.project_name()))
openrc_config_data_file = configure_file(
input: 'tufmanager.in',
output: 'tufmanager',
configuration: openrc_config_data
)
if openrc
install_data(
openrc_config_data_file,
install_dir: join_paths(get_option('sysconfdir'), 'init.d')
)
permissions = find_program('chmod')
meson.add_install_script('permission.sh', join_paths(get_option('sysconfdir'), 'init.d'))
endif

4
contrib/openrc/permission.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh -eu
echo "Make OpenRC script executable..."
chmod 755 "${DESTDIR}${1}/tufmanager"

View File

@@ -11,11 +11,11 @@
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
command=@PKG_PREFIX@/libexec/tuf-manager/tuf-server
command=@LIBEXECDIR@/tuf-server
pidfile=/var/run/tufmanager/tufmanager.pid
name="TUF Manager daemon"
depend()
{
need dbus
need dbus
}