[Lunar-commits] <moonbase-other> proftpd: Added systemd service files

Stefan Wold ratler at lunar-linux.org
Tue Jul 31 18:44:19 CEST 2012


commit 7d84d351cbdc595dbf29dd7a002a49b81b1c2a06
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Tue, 31 Jul 2012 09:44:19 -0700
URL: https://github.com/lunar-linux/moonbase-other/commit/7d84d351cbdc595dbf29dd7a002a49b81b1c2a06

proftpd: Added systemd service files
---
  ftp/proftpd/BUILD                                            +10/-3    
  ftp/proftpd/systemd.d/proftpd.service                        +12/-0    
  ftp/proftpd/tmpfiles.d/proftpd.conf                          +1/-0     
  3 files changed, 23 insertions (+), 3 deletions (-)

--- a/ftp/proftpd/BUILD
+++ b/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=""
 
@@ -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
--- /dev/null
+++ b/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
--- /dev/null
+++ b/ftp/proftpd/tmpfiles.d/proftpd.conf
@@ -0,0 +1 @@
+d /run/proftpd 0700 root root -




More information about the Lunar-commits mailing list