Socket
Book a DemoInstallSign in
Socket

autostart-manager

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autostart-manager

Firstly, this package was for me, only for one - enabling easy start https://github.com/brozeph/simple-socks.git

latest
Source
npmnpm
Version
1.0.7
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

Autostart manager

Firstly, this package was for me, only for one - enabling easy start https://github.com/brozeph/simple-socks.git

But i note that i sometimes meet the problem of automaticly starting my script on launch of system. And every time I have to create a script in init.d .. register it .. So i am going to add cli functional and support of another init systems

Installation

npm install autostart-manager

Supported init systems

Linux:

  • systemd
  • upstart

Mac:

  • launchd

ToDo

  • add support of systemv, openrc
  • fix bugs in launchd, systemd
  • cli interface (simple version)
  • validation of settings
  • method isEnabled
  • show message if this script already created/removed with confirm overwriting
  • add tests
  • more features (Add more settings, add support of windows)

Example Usage

const AutostartManager = require('autostart-manager'),

var manager = new AutostartManager({
    name: 'simple-socks'
})
// Add current script to init system
function enableAutostart(){
    manager.enable()
}

// Remove current script from init system
function disableAutostart(){
    manager.disable()
}

Options

Constructor of the class AutostartManager expected only one argument – settings(object) Settings:

  • name: {string} name of script(required)
  • script: {string} path to the script (Default: current script)
  • args: {string[]} array of strings, arguments with which the script will be launched
  • env: {object} environment variables
  • user: {string} name of user (Default: current user)

PS

Sorry for my English)

Keywords

launch

FAQs

Package last updated on 06 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts