Skip to content

Commit

Permalink
proftpd: Added systemd service files
Browse files Browse the repository at this point in the history
  • Loading branch information
Ratler committed Jul 31, 2012
1 parent 98fc438 commit 7d84d35
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
13 changes: 10 additions & 3 deletions ftp/proftpd/BUILD
@@ -1,5 +1,9 @@
(

if module_installed systemd; then
OPTS+=" --localstatedir=/run/proftpd"
fi

PROFTPD_MODULES="mod_ifsession mod_ldap mod_radius mod_ratio mod_readme mod_rewrite mod_tls mod_wrap"
MODS=""

Expand All @@ -23,18 +27,21 @@

MODS=`echo $MODS|sed -re 's%^:%%'`


if [ -n "$MODS" ]; then
OPTS+=" --with-modules=$MODS"
fi

if module_installed Linux-PAM; then
OPTS=$OPTS" --enable-shadow $ENABLE_PAM"
OPTS+=" --enable-shadow $ENABLE_PAM"
fi

sedit "s/\tstandalone/\tinetd/" sample-configurations/basic.conf &&
sedit "s/\tstandalone/\tinetd/" sample-configurations/basic.conf
cp -r sample-configurations doc

default_build

if module_installed systemd; then
mkdir -p /run/proftpd
fi

) > $C_FIFO 2>&1
12 changes: 12 additions & 0 deletions ftp/proftpd/systemd.d/proftpd.service
@@ -0,0 +1,12 @@
[Unit]
Description=ProFTPD FTP Server
After=network.target nss-lookup.target local-fs.target remote-fs.target

[Service]
Type=forking
PIDFile=/run/proftpd/proftpd.pid
ExecStart=/usr/sbin/proftpd
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target
1 change: 1 addition & 0 deletions ftp/proftpd/tmpfiles.d/proftpd.conf
@@ -0,0 +1 @@
d /run/proftpd 0700 root root -

0 comments on commit 7d84d35

Please sign in to comment.