openssl genrsa -out server.key 2048
openssl req -new -x509 -key server.key -out server.pem -days 3650
package main | |
import ( | |
"fmt" | |
"os" | |
"os/signal" | |
"syscall" | |
) | |
func main() { |
package main | |
import ( | |
"image" | |
_ "image/gif" | |
_ "image/jpeg" | |
_ "image/png" | |
"io" | |
"mime" |
# Make it executable | |
sudo chmod +x etc/init.d/myapp | |
# Try it: | |
sudo service myapp start | |
# Make it run upon boot: | |
sudo update-rc.d myapp defaults |
#!/bin/bash | |
# | |
# chkconfig: 35 95 05 | |
# description: Hello world application. | |
# Run at startup: sudo chkconfig hello-world on | |
# Load functions from library | |
. /etc/init.d/functions |