# autostart-manager

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

Latest version **1.0.7** (published 2017-04-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install autostart-manager
pnpm add autostart-manager
yarn add autostart-manager
bun add autostart-manager
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2017-04-06 |
| First published | 2017-04-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | https://github.com/VLZH |
| Maintainers | vlzh |
| Keywords | launch, init.d, autostart, autostart forever, systemd, upstart, launchd |

## Links

- npm: https://www.npmjs.com/package/autostart-manager
- Repository: https://github.com/VLZH/autostart-manager
- Homepage: https://github.com/VLZH/autostart-manager#readme
- Issues: https://github.com/VLZH/autostart-manager/issues
- npm.io page: https://npm.io/package/autostart-manager

## Dependencies (5)

- [async](https://npm.io/package/async.md) ^2.3.0
- [chalk](https://npm.io/package/chalk.md) ^1.1.3
- [debug](https://npm.io/package/debug.md) ^2.6.3
- [is-root](https://npm.io/package/is-root.md) ^1.0.0
- [shelljs](https://npm.io/package/shelljs.md) ^0.7.7

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 1.0.7 (latest) — 2017-04-06
- 1.0.6 — 2017-04-06
- 1.0.5 — 2017-04-06
- 1.0.4 — 2017-04-06
- 0.0.4 — 2017-04-06
- 0.0.3 — 2017-04-06
- 0.0.2 — 2017-04-06
- 0.0.1 — 2017-04-06
- 0.0.0 — 2017-04-06

## README

# 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

```javascript
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)

---
_Source: https://npm.io/package/autostart-manager · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
