Socket
Socket
Sign inDemoInstall

autostart-manager

Package Overview
Dependencies
36
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

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


Version published
Maintainers
1
Install size
2.53 MB
Created

Readme

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

FAQs

Last updated on 06 Apr 2017

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc