Skip to content

Burn-d configures your script as a daemon on operating systems managed by systemd (Linux) or sysrc (FreeBSD).

License

Notifications You must be signed in to change notification settings

usrbinbrain/burn-d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Burn-d

Burn-d configures your script as a daemon on operating systems managed by systemd and sysrc.

Features.

  • Automatically identifies the operating system management system, systemd (Linux) or sysrc (FreeBSD).
  • Allows you to deploy any type of script.
  • After executing the deploy of the daemon, just start the created service.

Install.

Clone repo and modify burn-d.sh execution permissions.

git clone https://github.com/usrbinbrain/burn-d.git && chmod +x burn-d/burn-d.sh

For a better experience create and add burn-d alias in your bashrc.

alias burn-d=$PWD/burn-d.sh && echo "alias burn-d=$PWD/burn-d/burn-d.sh" >> $HOME/.bashrc

Execution.

After installation, just access the script directory that will be configured as a daemon.

Run burn-d passing your script as the first argument for the management system to be identified and the daemon file created.

Let's assume that the directory is /home/user/script and the script has the name target_script.py

# Access path script.
$ cd /home/user/script
# Run burd-d with script.
$ burn-d script_target.py
Expected output in systemd environments.
[+] Systemd service ( script_target ) created on /etc/systemd/system/script_target.service !

To start your new daemons configured in systemd reload the systemctl then enable the daemon and start

systemctl daemon-reload && systemctl enable script_target && systemct start script_target

Expected output in sysrc environments.
script_target_d_enable="YES" # -> "YES"
[+] Sysrc service ( script_target_d ) created on /usr/local/etc/rc.d/script_target.sh !

When deploying the deamon in the sysrc managed environment, the deamon is already enabled by default at the boot of the operating system, so just start deamon with the following command.

service script_target_d start

About

Burn-d configures your script as a daemon on operating systems managed by systemd (Linux) or sysrc (FreeBSD).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages