Created
November 19, 2015 17:12
-
-
Save goliatone/304d2853a316ad1ba331 to your computer and use it in GitHub Desktop.
ubuntu init script that you can use to easily control a dat from Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ubuntu init script | |
| # change YOUR_DAT_DIRECTORY | |
| # save as /etc/init/dat.conf | |
| # then run: sudo start dat | |
| description 'serve a dat' | |
| author 'Mathias Buus' | |
| start on (filesystem and net-device-up IFACE=lo) | |
| stop on runlevel [!2345] | |
| respawn | |
| respawn limit 10 5 | |
| limit nofile 65535 65535 | |
| setuid ubuntu | |
| setgid ubuntu | |
| script | |
| cd YOUR_DAT_DIRECTORY | |
| dat serve --readonly # remove --readonly if you want to accept pushes | |
| end script |
goliatone
commented
Nov 19, 2015
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment