second commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
case $1 in
|
||||
minute) ;;
|
||||
daily) ;;
|
||||
*) echo "expected [minute|daily]" && exit 1 ;;
|
||||
esac
|
||||
|
||||
SELECTOR=$1
|
||||
|
||||
for i in /var/www/cagettepei/*; do
|
||||
if [[ -d $i ]]; then
|
||||
cd "$i/www" || echo "Folder not found: $i/www"
|
||||
echo "cron-$SELECTOR in: $i"
|
||||
neko index.n cron/$SELECTOR
|
||||
echo
|
||||
fi
|
||||
done
|
||||
@@ -0,0 +1,8 @@
|
||||
Listen {{ env.APP_PORT }}
|
||||
<VirtualHost *:{{ env.APP_PORT }}>
|
||||
DirectoryIndex index.n
|
||||
DocumentRoot /var/www/cagettepei/{{env.APP_NAME}}/www/
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/cagettepei/{{env.APP_NAME}}/debug.log
|
||||
ErrorLogFormat "[%{uc}t] %M"
|
||||
</VirtualHost>
|
||||
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Run batch cagettepei every day
|
||||
|
||||
[Service]
|
||||
User=www-data
|
||||
SyslogIdentifier=cagettepei
|
||||
ExecStart=/var/www/cagettepei/cagettepei-batch daily
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Timer for batch cagettepei every day
|
||||
Requires=apache2.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar=daily
|
||||
Unit=cagettepei-batch-day.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Run batch cagettepei every minute
|
||||
|
||||
[Service]
|
||||
User=www-data
|
||||
SyslogIdentifier=cagettepei
|
||||
ExecStart=/var/www/cagettepei/cagettepei-batch minute
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Timer for batch cagettepei every minute
|
||||
Requires=apache2.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar=minutely
|
||||
Unit=cagettepei-batch-minute.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in New Issue
Block a user