Ubuntu
0
Вклад в тег
[Unit]
Description=Example .NET Web API App running on Ubuntu
[Service]
WorkingDirectory=/var/www/helloapp
ExecStart=/usr/bin/dotnet /var/www/helloapp/helloapp.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=dotnet-example
User=www-data
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
[Install]
WantedBy=multi-user.target
[Unit]
Description=siteRestartService
[Service]
Type=simple
ExecStart=/usr/local/bin/siteRestart.sh
[Install]
WantedBy=multi-user.target
[Unit]
Description=RestartSiteDaily
[Timer]
OnCalendar=daily
Unit=siteRestart.service
Persistent-true
[Install]
WantedBy=multi-user.target
#!/bin/bash
systemctl restart site.service