Files
dragonx/contrib/init/dragonxd.conf
DanS c05134e77e Compliant rebrand: legal compliance, code audit, and documentation (Phases 0-3)
Phase 0 - Legal Compliance:
- COPYING: Add DragonX copyright, preserve all upstream attributions
- AUTHORS: Add DragonX developers section
- LICENSE: Restore standard FSF GPLv3 text (fix GNU→GENERAL error)
- Add DragonX copyright headers to all 21 modified source files
- contrib/debian/copyright: Add DragonX attribution
- README.md: Add GPLv3 Section 5(a) attribution section

Phase 1 - init.cpp Cleanup:
- PID file: hushd.pid → dragonxd.pid
- Shutdown thread: hush-shutoff → dragonx-shutoff
- Debug message: stopping HUSH → stopping DragonX

Phase 2 - HUSH3/ishush3 Code Audit:
- Rename ishush3 → isdragonx across ~15 source files
- Update "HUSH3" chain-identity checks to "DRAGONX" in consensus,
  difficulty, notarization, devtax, and RPC code
- Intentionally preserve cross-chain "HUSH3" refs (gateway, notary dest)
- Build verified: all three binaries compile cleanly

Phase 3 - Documentation:
- README.md: Full rewrite with DragonX chain params, build instructions
- Man pages: Create dragonxd.1, dragonx-cli.1, dragonx-tx.1 (v1.0.0)
- Doc files: Add beefy-DRAGONX.conf, dragonxd-systemd.md, dragonxd.service
- Init scripts: Create dragonxd.{conf,init,openrc,openrcconf,service}
- Debian packaging: Update control, changelog, install, manpages, examples
- Update doc/init.md and contrib/init/README.md
2026-03-03 19:01:24 -06:00

60 lines
1.8 KiB
Plaintext

description "Hush Daemon"
start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]
env HUSHD_BIN="/usr/bin/dragonxd"
env HUSHD_USER="hush"
env HUSHD_GROUP="hush"
env HUSHD_PIDDIR="/var/run/dragonxd"
# upstart can't handle variables constructed with other variables
env HUSHD_PIDFILE="/var/run/dragonxd/dragonxd.pid"
env HUSHD_CONFIGFILE="/etc/hush/hush.conf"
env HUSHD_DATADIR="/var/lib/dragonxd"
expect fork
respawn
respawn limit 5 120
kill timeout 60
pre-start script
# this will catch non-existent config files
# dragonxd will check and exit with this very warning, but it can do so
# long after forking, leaving upstart to think everything started fine.
# since this is a commonly encountered case on install, just check and
# warn here.
if ! grep -qs '^rpcpassword=' "$HUSHD_CONFIGFILE" ; then
echo "ERROR: You must set a secure rpcpassword to run dragonxd."
echo "The setting must appear in $HUSHD_CONFIGFILE"
echo
echo "This password is security critical to securing wallets "
echo "and must not be the same as the rpcuser setting."
echo "You can generate a suitable random password using the following"
echo "command from the shell:"
echo
echo "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'"
echo
exit 1
fi
mkdir -p "$HUSHD_PIDDIR"
chmod 0755 "$HUSHD_PIDDIR"
chown $HUSHD_USER:$HUSHD_GROUP "$HUSHD_PIDDIR"
chown $HUSHD_USER:$HUSHD_GROUP "$HUSHD_CONFIGFILE"
chmod 0660 "$HUSHD_CONFIGFILE"
end script
exec start-stop-daemon \
--start \
--pidfile "$HUSHD_PIDFILE" \
--chuid $HUSHD_USER:$HUSHD_GROUP \
--exec "$HUSHD_BIN" \
-- \
-pid="$HUSHD_PIDFILE" \
-conf="$HUSHD_CONFIGFILE" \
-datadir="$HUSHD_DATADIR" \
-disablewallet \
-daemon