| @@ -1,6 +1,6 @@ | |||||
| { | { | ||||
| "port": 8088, | "port": 8088, | ||||
| "realm": "manas", | |||||
| "realm": "WebDAV-manas", | |||||
| "mounts": { | "mounts": { | ||||
| "Music": "/media/hd1/Music", | "Music": "/media/hd1/Music", | ||||
| "Movies": "/media/hd1/Movies", | "Movies": "/media/hd1/Movies", | ||||
| @@ -0,0 +1,5 @@ | |||||
| #!/bin/bash | |||||
| sudo cp ./nas-webdav.service /etc/systemd/system/ | |||||
| sudo systemctl enable nas-webdav | |||||
| sudo systemctl start nas-webdav | |||||
| sudo systemctl status nas-webdav | |||||
| @@ -0,0 +1,14 @@ | |||||
| [Unit] | |||||
| Description=NAS WebDav-Server | |||||
| [Service] | |||||
| EnvironmentFile=-/etc/default/my-application | |||||
| ExecStart=/home/michael/nas-webdav/start.sh | |||||
| WorkingDirectory=/home/michael/nas-webdav | |||||
| LimitNOFILE=4096 | |||||
| IgnoreSIGPIPE=false | |||||
| KillMode=process | |||||
| User=michael | |||||
| [Install] | |||||
| WantedBy=multi-user.target | |||||
| @@ -4,7 +4,7 @@ | |||||
| "description": "", | "description": "", | ||||
| "main": "index.js", | "main": "index.js", | ||||
| "scripts": { | "scripts": { | ||||
| "build": "tsc -p ./tsconfig.json", | |||||
| "build": "npx tsc -p ./tsconfig.json", | |||||
| "start": "node dist/index.js", | "start": "node dist/index.js", | ||||
| "start-debug": "nodemon --inspect dist/index.js", | "start-debug": "nodemon --inspect dist/index.js", | ||||
| "test": "echo \"Error: no test specified\" && exit 1" | "test": "echo \"Error: no test specified\" && exit 1" | ||||
| @@ -20,6 +20,7 @@ | |||||
| "webdav-server": "^2.6.2" | "webdav-server": "^2.6.2" | ||||
| }, | }, | ||||
| "devDependencies": { | "devDependencies": { | ||||
| "typescript": "^3.9.7", | |||||
| "@types/node": "^14.11.2", | "@types/node": "^14.11.2", | ||||
| "@typescript-eslint/eslint-plugin": "^4.1.1", | "@typescript-eslint/eslint-plugin": "^4.1.1", | ||||
| "@typescript-eslint/parser": "^4.1.1", | "@typescript-eslint/parser": "^4.1.1", | ||||
| @@ -27,4 +28,4 @@ | |||||
| "prettier": "^2.1.2", | "prettier": "^2.1.2", | ||||
| "rimraf": "^3.0.2" | "rimraf": "^3.0.2" | ||||
| } | } | ||||
| } | |||||
| } | |||||
| @@ -23,7 +23,7 @@ const users = getConfig('users'); | |||||
| if (typeof config.port === undefined) | if (typeof config.port === undefined) | ||||
| config.port = 8080; | config.port = 8080; | ||||
| if (typeof config.realm === undefined) | if (typeof config.realm === undefined) | ||||
| config.realm = "realm"; | |||||
| config.realm = "WebDAV"; | |||||
| let mountNames : string[] = []; | let mountNames : string[] = []; | ||||
| for (let mount in config['mounts']) { | for (let mount in config['mounts']) { | ||||
| @@ -0,0 +1,2 @@ | |||||
| #!/bin/bash | |||||
| npm start | |||||