#!/bin/sh ntfy_version=2.12.0 # Change to build directory cd ntfy-${ntfy_version} # Copy binary to install directory cp ntfy /usr/local/bin/ # Copy server & client configs mkdir /usr/local/etc/ntfy cp server/server.yml client/client.yml /usr/local/etc/ntfy/ # Change back to root of install cd .. # Make executable & Copy startup scripts chmod +x rc.d/ntfy* cp rc.d/ntfy* /usr/local/etc/rc.d/ # Create ntfy user pw user add -n ntfy -c 'ntfy user' -d /var/empty -s /usr/sbin/nologin # Create directories for attachments, db, and pid file mkdir -p /var/{run/ntfy,cache/ntfy/attachments,/lib/ntfy} chown ntfy /var/{run/ntfy,cache/ntfy/attachments,/lib/ntfy} # Setup instructions cat postinstall