-the location of xxxx.service file
/etc/systemd/system/xxxx.service
-reload service(must be done after registration or file adjust)
sudo systemctl daemon-reload
-check service registered properly
sudo systemctl status xxxx.service -l
-start
sudo systemctl start lazarus-web
-working xxxx.service file
[Service]
Type=simple
#EnvironmentFile Don't need
#EnvironmentFile=/path/to/app/conf/application.conf
PIDFile=/path/to/app/RUNNING_PID
WorkingDirectory=/path/to/app
#the filename will be the bash script name
ExecStart=/bin/bash /path/to/app/bin/filename -Dhttp.port=80
Restart=on-failure
RestartSec=3
#User Don't need
#User=memememe
#Group Don't need
#Group=memememe
# See http://serverfault.com/a/695863
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
'코딩 > AWS' 카테고리의 다른 글
AWS에 play 앱 빌드, 배포 과정 (0) | 2018.07.29 |
---|---|
AWS BeanStalk에서 MessageSource가 제대로 안 읽힐 때 (0) | 2015.10.09 |
AWS RDS Mysql에서 Timezone 바꾸기 (0) | 2015.10.07 |