[Unit]
Description=Autodir Home service
PartOf=autodir.service
After=autodir.service

[Service]
Type=oneshot
RemainAfterExit=yes
Environment=AUTOHOME_HOME=/home AUTOHOME_TIMEOUT=600
Environment=AUTOHOME_MODULE=/usr/lib/autodir/autohome.so
Environment="AUTHOME_OPTIONS=realpath=/autohome,level=2,skel=/etc/skel"
Environment=AUTOHOME_BACKUP=/bin/true
Environment=AUTOHOME_BACKWAIT=600
Environment=AUTOHOME_BACKPRI=30
Environment=AUTOHOME_MAXBACK=150
EnvironmentFile=-/etc/default/autodir
PIDFile=/run/autohome.pid
ExecReload=/bin/kill -HUP $MAINPID
ExecCondition=/usr/bin/egrep -qe '^RUN_AUTOHOME="yes"' /etc/default/autodir
ExecStart=/usr/sbin/autodir \
 -d $AUTOHOME_HOME -m $AUTOHOME_MODULE \
 -o $AUTOHOME_OPTIONS \
 -t $AUTOHOME_TIMEOUT \
 -b $AUTOHOME_BACKUP \
 -w $AUTOHOME_BACKWAIT \
 -p $AUTOHOME_BACKPRI \
 -c $AUTOHOME_MAXBACK \
 -l /run/autohome.pid

[Install]
WantedBy=autodir.service

