How to restore the /etc/init.d/pure-ftpd-mysql?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















By a mistake... this is my new /etc/init.d/pure-ftpd-mysql:



 /etc/init.d/pure-ftpd-mysql restart


How to install or recover the file? The standard apt-get remove, apt-get install or apt-get install --reinstall pure-ftpd-common pure-ftpd-mysql doesn’t give me that file back.










share|improve this question






























    0















    By a mistake... this is my new /etc/init.d/pure-ftpd-mysql:



     /etc/init.d/pure-ftpd-mysql restart


    How to install or recover the file? The standard apt-get remove, apt-get install or apt-get install --reinstall pure-ftpd-common pure-ftpd-mysql doesn’t give me that file back.










    share|improve this question


























      0












      0








      0








      By a mistake... this is my new /etc/init.d/pure-ftpd-mysql:



       /etc/init.d/pure-ftpd-mysql restart


      How to install or recover the file? The standard apt-get remove, apt-get install or apt-get install --reinstall pure-ftpd-common pure-ftpd-mysql doesn’t give me that file back.










      share|improve this question
















      By a mistake... this is my new /etc/init.d/pure-ftpd-mysql:



       /etc/init.d/pure-ftpd-mysql restart


      How to install or recover the file? The standard apt-get remove, apt-get install or apt-get install --reinstall pure-ftpd-common pure-ftpd-mysql doesn’t give me that file back.







      debian sysvinit restore






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 10 at 4:14









      Rui F Ribeiro

      42k1483142




      42k1483142










      asked Jun 29 '13 at 10:27









      frufflfruffl

      33




      33




















          3 Answers
          3






          active

          oldest

          votes


















          1














          If you have the binary .deb file, you can use Midnight commander (mc) from the shell to just navigate inside and retrieve files from it.



          For your convenience, this is the file as found in pure-ftpd-mysql_1.0.36-1.1_i386.deb:



          #! /bin/sh
          ### BEGIN INIT INFO
          # Provides: pure-ftpd-mysql
          # Required-Start: $remote_fs $syslog
          # Required-Stop: $remote_fs $syslog
          # Should-Start: slapd mysql postgresql-8.3 postgresql-8.4
          # Should-Stop: slapd mysql postgresql-8.3 postgresql-8.4
          # Default-Start: 2 3 4 5
          # Default-Stop: 0 1 6
          ### END INIT INFO
          #
          # pure-ftpd starts and stops the pure-ftpd ftp daemon
          #
          # Copyright 2002-2011 by Stefan Hornburg (Racke) <racke@linuxia.de>

          PATH=/sbin:/bin:/usr/sbin:/usr/bin
          NAME=pure-ftpd
          DESC="ftp server"
          : $SSDAEMONLOGOPTS:="--quiet"
          UPLOADDAEMON=/usr/sbin/pure-uploadscript
          UDNAME=pure-uploadscript
          UDDESC="ftp upload handler"
          WRAPPER=/usr/sbin/pure-ftpd-wrapper

          # load LSB init-functions to get status_of_proc helper
          . /lib/lsb/init-functions

          PIDFILE=/var/run/pure-ftpd/pure-ftpd.pid

          # try to figure with suffix this script is called,
          # $0 might be a symlink pointing to this script
          if [ -h $0 ]; then
          ME=`/bin/readlink $0`
          else
          ME=$0
          fi

          SUFFIX=`basename $ME | sed -ne 's/^pure-ftpd-(.*)/1/p'`
          if [ "$SUFFIX" ] ; then
          DAEMON=/usr/sbin/pure-ftpd-$SUFFIX
          else
          DAEMON=/usr/sbin/pure-ftpd
          fi

          export STANDALONE_OR_INETD=inetd
          export VIRTUALCHROOT=
          test -r /etc/default/pure-ftpd-common && . /etc/default/pure-ftpd-common

          if [ "$VIRTUALCHROOT" = "true" ]; then
          if [ "$SUFFIX" ]; then
          SUFFIX="$SUFFIX-virtualchroot"
          else
          SUFFIX="virtualchroot"
          fi
          fi

          test -x $DAEMON || exit 0
          test -x $WRAPPER || exit 0

          set -e

          if [ ! -e `dirname $PIDFILE` ];then
          mkdir `dirname $PIDFILE`
          fi

          start_uploadscript()
          if [ "$UPLOADSCRIPT" -a "$STANDALONE_OR_INETD" != inetd ] &&
          egrep -i '^[ ]*(yes

          case "$1" in
          start)
          test "$STANDALONE_OR_INETD" = standalone || exit 0
          echo -n "Starting $DESC: "
          start-stop-daemon --start $SSDAEMONLOGOPTS --pidfile "$PIDFILE"
          --exec $WRAPPER -- $SUFFIX
          start_uploadscript Starting
          ;;
          stop)
          echo -n "Stopping $DESC: "
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo
          --pidfile "$PIDFILE"
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo --exec $UPLOADDAEMON
          echo "$NAME."
          ;;
          restart|force-reload)
          test "$STANDALONE_OR_INETD" = standalone || exit 0
          echo -n "Restarting $DESC: "
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo
          --pidfile "$PIDFILE"
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo --exec $UPLOADDAEMON
          sleep 1
          start-stop-daemon --start $SSDAEMONLOGOPTS --pidfile "$PIDFILE"
          --exec $WRAPPER -- $SUFFIX
          start_uploadscript Restarting
          ;;
          status)
          status_of_proc -p /var/run/pure-ftpd/pure-ftpd.pid $DAEMON $NAME && exit 0 || exit $?
          ;;
          *)
          N=/etc/init.d/$NAME
          echo "Usage: $N stop" >&2
          exit 1
          ;;
          esac

          exit 0





          share|improve this answer























          • Thanks for your answer. hack the .deb... works fine for me. o/ Have a good weekend!

            – fruffl
            Jun 29 '13 at 12:10


















          0














          Have you tried to remove the file with rm and then re-install the package?



          If it doesn't work, you can try aptitude purge or apt-get remove --purge to remove the package and all its configuration files. Then, install it again and you will get the default configuration file.



          If nothing works, try to get the .deb file from the repo (look fo it in packages.debian.org), and untar it twice (first, the .deb package, and then the data.tar.gz that will be included inside the .deb. You must find the configuration file there.






          share|improve this answer























          • Frankly, I'd suggest opening the deb (with something like mc which does the unpacking transparently for you and can view and copy files out of there) over remove-reinstall, because it's pretty sure to be less-destructive.

            – Ulrich Schwarz
            Jun 29 '13 at 11:02











          • @JoseLSegura Thanks for your answer. Yes: I've removed the file before reinstall the package. The installer doesn't create a new copy. I think purge is not the best solution in this case: running system vs. one missing textfile.

            – fruffl
            Jun 29 '13 at 12:09


















          0














          just create an empty file before re-installing



          sudo touch /etc/init.d/pure-ftpd-mysql


          then reinstall with --purge flag (it removes a library with this file, and creates a new work file)



          sudo apt-get remove pure-ftpd-mysql --purge

          sudo apt-get install pure-ftpd-mysql





          share|improve this answer

























          • Welcome to Unix&Linux!  The above essentially duplicates another answer and adds no new content.  Please don’t post an answer unless you actually have something new to contribute.  But also, we’re looking for comprehensive, high-quality answers that provide some explanation and context.  Don’t just give a bunch of sudo commands; explain why your answer is right, ideally with citations, and at the very least with sentences.  Answers that don’t include explanations may be removed.

            – G-Man
            May 25 '15 at 9:40











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f81119%2fhow-to-restore-the-etc-init-d-pure-ftpd-mysql%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          3 Answers
          3






          active

          oldest

          votes








          3 Answers
          3






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          If you have the binary .deb file, you can use Midnight commander (mc) from the shell to just navigate inside and retrieve files from it.



          For your convenience, this is the file as found in pure-ftpd-mysql_1.0.36-1.1_i386.deb:



          #! /bin/sh
          ### BEGIN INIT INFO
          # Provides: pure-ftpd-mysql
          # Required-Start: $remote_fs $syslog
          # Required-Stop: $remote_fs $syslog
          # Should-Start: slapd mysql postgresql-8.3 postgresql-8.4
          # Should-Stop: slapd mysql postgresql-8.3 postgresql-8.4
          # Default-Start: 2 3 4 5
          # Default-Stop: 0 1 6
          ### END INIT INFO
          #
          # pure-ftpd starts and stops the pure-ftpd ftp daemon
          #
          # Copyright 2002-2011 by Stefan Hornburg (Racke) <racke@linuxia.de>

          PATH=/sbin:/bin:/usr/sbin:/usr/bin
          NAME=pure-ftpd
          DESC="ftp server"
          : $SSDAEMONLOGOPTS:="--quiet"
          UPLOADDAEMON=/usr/sbin/pure-uploadscript
          UDNAME=pure-uploadscript
          UDDESC="ftp upload handler"
          WRAPPER=/usr/sbin/pure-ftpd-wrapper

          # load LSB init-functions to get status_of_proc helper
          . /lib/lsb/init-functions

          PIDFILE=/var/run/pure-ftpd/pure-ftpd.pid

          # try to figure with suffix this script is called,
          # $0 might be a symlink pointing to this script
          if [ -h $0 ]; then
          ME=`/bin/readlink $0`
          else
          ME=$0
          fi

          SUFFIX=`basename $ME | sed -ne 's/^pure-ftpd-(.*)/1/p'`
          if [ "$SUFFIX" ] ; then
          DAEMON=/usr/sbin/pure-ftpd-$SUFFIX
          else
          DAEMON=/usr/sbin/pure-ftpd
          fi

          export STANDALONE_OR_INETD=inetd
          export VIRTUALCHROOT=
          test -r /etc/default/pure-ftpd-common && . /etc/default/pure-ftpd-common

          if [ "$VIRTUALCHROOT" = "true" ]; then
          if [ "$SUFFIX" ]; then
          SUFFIX="$SUFFIX-virtualchroot"
          else
          SUFFIX="virtualchroot"
          fi
          fi

          test -x $DAEMON || exit 0
          test -x $WRAPPER || exit 0

          set -e

          if [ ! -e `dirname $PIDFILE` ];then
          mkdir `dirname $PIDFILE`
          fi

          start_uploadscript()
          if [ "$UPLOADSCRIPT" -a "$STANDALONE_OR_INETD" != inetd ] &&
          egrep -i '^[ ]*(yes

          case "$1" in
          start)
          test "$STANDALONE_OR_INETD" = standalone || exit 0
          echo -n "Starting $DESC: "
          start-stop-daemon --start $SSDAEMONLOGOPTS --pidfile "$PIDFILE"
          --exec $WRAPPER -- $SUFFIX
          start_uploadscript Starting
          ;;
          stop)
          echo -n "Stopping $DESC: "
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo
          --pidfile "$PIDFILE"
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo --exec $UPLOADDAEMON
          echo "$NAME."
          ;;
          restart|force-reload)
          test "$STANDALONE_OR_INETD" = standalone || exit 0
          echo -n "Restarting $DESC: "
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo
          --pidfile "$PIDFILE"
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo --exec $UPLOADDAEMON
          sleep 1
          start-stop-daemon --start $SSDAEMONLOGOPTS --pidfile "$PIDFILE"
          --exec $WRAPPER -- $SUFFIX
          start_uploadscript Restarting
          ;;
          status)
          status_of_proc -p /var/run/pure-ftpd/pure-ftpd.pid $DAEMON $NAME && exit 0 || exit $?
          ;;
          *)
          N=/etc/init.d/$NAME
          echo "Usage: $N stop" >&2
          exit 1
          ;;
          esac

          exit 0





          share|improve this answer























          • Thanks for your answer. hack the .deb... works fine for me. o/ Have a good weekend!

            – fruffl
            Jun 29 '13 at 12:10















          1














          If you have the binary .deb file, you can use Midnight commander (mc) from the shell to just navigate inside and retrieve files from it.



          For your convenience, this is the file as found in pure-ftpd-mysql_1.0.36-1.1_i386.deb:



          #! /bin/sh
          ### BEGIN INIT INFO
          # Provides: pure-ftpd-mysql
          # Required-Start: $remote_fs $syslog
          # Required-Stop: $remote_fs $syslog
          # Should-Start: slapd mysql postgresql-8.3 postgresql-8.4
          # Should-Stop: slapd mysql postgresql-8.3 postgresql-8.4
          # Default-Start: 2 3 4 5
          # Default-Stop: 0 1 6
          ### END INIT INFO
          #
          # pure-ftpd starts and stops the pure-ftpd ftp daemon
          #
          # Copyright 2002-2011 by Stefan Hornburg (Racke) <racke@linuxia.de>

          PATH=/sbin:/bin:/usr/sbin:/usr/bin
          NAME=pure-ftpd
          DESC="ftp server"
          : $SSDAEMONLOGOPTS:="--quiet"
          UPLOADDAEMON=/usr/sbin/pure-uploadscript
          UDNAME=pure-uploadscript
          UDDESC="ftp upload handler"
          WRAPPER=/usr/sbin/pure-ftpd-wrapper

          # load LSB init-functions to get status_of_proc helper
          . /lib/lsb/init-functions

          PIDFILE=/var/run/pure-ftpd/pure-ftpd.pid

          # try to figure with suffix this script is called,
          # $0 might be a symlink pointing to this script
          if [ -h $0 ]; then
          ME=`/bin/readlink $0`
          else
          ME=$0
          fi

          SUFFIX=`basename $ME | sed -ne 's/^pure-ftpd-(.*)/1/p'`
          if [ "$SUFFIX" ] ; then
          DAEMON=/usr/sbin/pure-ftpd-$SUFFIX
          else
          DAEMON=/usr/sbin/pure-ftpd
          fi

          export STANDALONE_OR_INETD=inetd
          export VIRTUALCHROOT=
          test -r /etc/default/pure-ftpd-common && . /etc/default/pure-ftpd-common

          if [ "$VIRTUALCHROOT" = "true" ]; then
          if [ "$SUFFIX" ]; then
          SUFFIX="$SUFFIX-virtualchroot"
          else
          SUFFIX="virtualchroot"
          fi
          fi

          test -x $DAEMON || exit 0
          test -x $WRAPPER || exit 0

          set -e

          if [ ! -e `dirname $PIDFILE` ];then
          mkdir `dirname $PIDFILE`
          fi

          start_uploadscript()
          if [ "$UPLOADSCRIPT" -a "$STANDALONE_OR_INETD" != inetd ] &&
          egrep -i '^[ ]*(yes

          case "$1" in
          start)
          test "$STANDALONE_OR_INETD" = standalone || exit 0
          echo -n "Starting $DESC: "
          start-stop-daemon --start $SSDAEMONLOGOPTS --pidfile "$PIDFILE"
          --exec $WRAPPER -- $SUFFIX
          start_uploadscript Starting
          ;;
          stop)
          echo -n "Stopping $DESC: "
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo
          --pidfile "$PIDFILE"
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo --exec $UPLOADDAEMON
          echo "$NAME."
          ;;
          restart|force-reload)
          test "$STANDALONE_OR_INETD" = standalone || exit 0
          echo -n "Restarting $DESC: "
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo
          --pidfile "$PIDFILE"
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo --exec $UPLOADDAEMON
          sleep 1
          start-stop-daemon --start $SSDAEMONLOGOPTS --pidfile "$PIDFILE"
          --exec $WRAPPER -- $SUFFIX
          start_uploadscript Restarting
          ;;
          status)
          status_of_proc -p /var/run/pure-ftpd/pure-ftpd.pid $DAEMON $NAME && exit 0 || exit $?
          ;;
          *)
          N=/etc/init.d/$NAME
          echo "Usage: $N stop" >&2
          exit 1
          ;;
          esac

          exit 0





          share|improve this answer























          • Thanks for your answer. hack the .deb... works fine for me. o/ Have a good weekend!

            – fruffl
            Jun 29 '13 at 12:10













          1












          1








          1







          If you have the binary .deb file, you can use Midnight commander (mc) from the shell to just navigate inside and retrieve files from it.



          For your convenience, this is the file as found in pure-ftpd-mysql_1.0.36-1.1_i386.deb:



          #! /bin/sh
          ### BEGIN INIT INFO
          # Provides: pure-ftpd-mysql
          # Required-Start: $remote_fs $syslog
          # Required-Stop: $remote_fs $syslog
          # Should-Start: slapd mysql postgresql-8.3 postgresql-8.4
          # Should-Stop: slapd mysql postgresql-8.3 postgresql-8.4
          # Default-Start: 2 3 4 5
          # Default-Stop: 0 1 6
          ### END INIT INFO
          #
          # pure-ftpd starts and stops the pure-ftpd ftp daemon
          #
          # Copyright 2002-2011 by Stefan Hornburg (Racke) <racke@linuxia.de>

          PATH=/sbin:/bin:/usr/sbin:/usr/bin
          NAME=pure-ftpd
          DESC="ftp server"
          : $SSDAEMONLOGOPTS:="--quiet"
          UPLOADDAEMON=/usr/sbin/pure-uploadscript
          UDNAME=pure-uploadscript
          UDDESC="ftp upload handler"
          WRAPPER=/usr/sbin/pure-ftpd-wrapper

          # load LSB init-functions to get status_of_proc helper
          . /lib/lsb/init-functions

          PIDFILE=/var/run/pure-ftpd/pure-ftpd.pid

          # try to figure with suffix this script is called,
          # $0 might be a symlink pointing to this script
          if [ -h $0 ]; then
          ME=`/bin/readlink $0`
          else
          ME=$0
          fi

          SUFFIX=`basename $ME | sed -ne 's/^pure-ftpd-(.*)/1/p'`
          if [ "$SUFFIX" ] ; then
          DAEMON=/usr/sbin/pure-ftpd-$SUFFIX
          else
          DAEMON=/usr/sbin/pure-ftpd
          fi

          export STANDALONE_OR_INETD=inetd
          export VIRTUALCHROOT=
          test -r /etc/default/pure-ftpd-common && . /etc/default/pure-ftpd-common

          if [ "$VIRTUALCHROOT" = "true" ]; then
          if [ "$SUFFIX" ]; then
          SUFFIX="$SUFFIX-virtualchroot"
          else
          SUFFIX="virtualchroot"
          fi
          fi

          test -x $DAEMON || exit 0
          test -x $WRAPPER || exit 0

          set -e

          if [ ! -e `dirname $PIDFILE` ];then
          mkdir `dirname $PIDFILE`
          fi

          start_uploadscript()
          if [ "$UPLOADSCRIPT" -a "$STANDALONE_OR_INETD" != inetd ] &&
          egrep -i '^[ ]*(yes

          case "$1" in
          start)
          test "$STANDALONE_OR_INETD" = standalone || exit 0
          echo -n "Starting $DESC: "
          start-stop-daemon --start $SSDAEMONLOGOPTS --pidfile "$PIDFILE"
          --exec $WRAPPER -- $SUFFIX
          start_uploadscript Starting
          ;;
          stop)
          echo -n "Stopping $DESC: "
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo
          --pidfile "$PIDFILE"
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo --exec $UPLOADDAEMON
          echo "$NAME."
          ;;
          restart|force-reload)
          test "$STANDALONE_OR_INETD" = standalone || exit 0
          echo -n "Restarting $DESC: "
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo
          --pidfile "$PIDFILE"
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo --exec $UPLOADDAEMON
          sleep 1
          start-stop-daemon --start $SSDAEMONLOGOPTS --pidfile "$PIDFILE"
          --exec $WRAPPER -- $SUFFIX
          start_uploadscript Restarting
          ;;
          status)
          status_of_proc -p /var/run/pure-ftpd/pure-ftpd.pid $DAEMON $NAME && exit 0 || exit $?
          ;;
          *)
          N=/etc/init.d/$NAME
          echo "Usage: $N stop" >&2
          exit 1
          ;;
          esac

          exit 0





          share|improve this answer













          If you have the binary .deb file, you can use Midnight commander (mc) from the shell to just navigate inside and retrieve files from it.



          For your convenience, this is the file as found in pure-ftpd-mysql_1.0.36-1.1_i386.deb:



          #! /bin/sh
          ### BEGIN INIT INFO
          # Provides: pure-ftpd-mysql
          # Required-Start: $remote_fs $syslog
          # Required-Stop: $remote_fs $syslog
          # Should-Start: slapd mysql postgresql-8.3 postgresql-8.4
          # Should-Stop: slapd mysql postgresql-8.3 postgresql-8.4
          # Default-Start: 2 3 4 5
          # Default-Stop: 0 1 6
          ### END INIT INFO
          #
          # pure-ftpd starts and stops the pure-ftpd ftp daemon
          #
          # Copyright 2002-2011 by Stefan Hornburg (Racke) <racke@linuxia.de>

          PATH=/sbin:/bin:/usr/sbin:/usr/bin
          NAME=pure-ftpd
          DESC="ftp server"
          : $SSDAEMONLOGOPTS:="--quiet"
          UPLOADDAEMON=/usr/sbin/pure-uploadscript
          UDNAME=pure-uploadscript
          UDDESC="ftp upload handler"
          WRAPPER=/usr/sbin/pure-ftpd-wrapper

          # load LSB init-functions to get status_of_proc helper
          . /lib/lsb/init-functions

          PIDFILE=/var/run/pure-ftpd/pure-ftpd.pid

          # try to figure with suffix this script is called,
          # $0 might be a symlink pointing to this script
          if [ -h $0 ]; then
          ME=`/bin/readlink $0`
          else
          ME=$0
          fi

          SUFFIX=`basename $ME | sed -ne 's/^pure-ftpd-(.*)/1/p'`
          if [ "$SUFFIX" ] ; then
          DAEMON=/usr/sbin/pure-ftpd-$SUFFIX
          else
          DAEMON=/usr/sbin/pure-ftpd
          fi

          export STANDALONE_OR_INETD=inetd
          export VIRTUALCHROOT=
          test -r /etc/default/pure-ftpd-common && . /etc/default/pure-ftpd-common

          if [ "$VIRTUALCHROOT" = "true" ]; then
          if [ "$SUFFIX" ]; then
          SUFFIX="$SUFFIX-virtualchroot"
          else
          SUFFIX="virtualchroot"
          fi
          fi

          test -x $DAEMON || exit 0
          test -x $WRAPPER || exit 0

          set -e

          if [ ! -e `dirname $PIDFILE` ];then
          mkdir `dirname $PIDFILE`
          fi

          start_uploadscript()
          if [ "$UPLOADSCRIPT" -a "$STANDALONE_OR_INETD" != inetd ] &&
          egrep -i '^[ ]*(yes

          case "$1" in
          start)
          test "$STANDALONE_OR_INETD" = standalone || exit 0
          echo -n "Starting $DESC: "
          start-stop-daemon --start $SSDAEMONLOGOPTS --pidfile "$PIDFILE"
          --exec $WRAPPER -- $SUFFIX
          start_uploadscript Starting
          ;;
          stop)
          echo -n "Stopping $DESC: "
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo
          --pidfile "$PIDFILE"
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo --exec $UPLOADDAEMON
          echo "$NAME."
          ;;
          restart|force-reload)
          test "$STANDALONE_OR_INETD" = standalone || exit 0
          echo -n "Restarting $DESC: "
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo
          --pidfile "$PIDFILE"
          start-stop-daemon --stop $SSDAEMONLOGOPTS --oknodo --exec $UPLOADDAEMON
          sleep 1
          start-stop-daemon --start $SSDAEMONLOGOPTS --pidfile "$PIDFILE"
          --exec $WRAPPER -- $SUFFIX
          start_uploadscript Restarting
          ;;
          status)
          status_of_proc -p /var/run/pure-ftpd/pure-ftpd.pid $DAEMON $NAME && exit 0 || exit $?
          ;;
          *)
          N=/etc/init.d/$NAME
          echo "Usage: $N stop" >&2
          exit 1
          ;;
          esac

          exit 0






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jun 29 '13 at 11:05









          Ulrich SchwarzUlrich Schwarz

          10.1k13148




          10.1k13148












          • Thanks for your answer. hack the .deb... works fine for me. o/ Have a good weekend!

            – fruffl
            Jun 29 '13 at 12:10

















          • Thanks for your answer. hack the .deb... works fine for me. o/ Have a good weekend!

            – fruffl
            Jun 29 '13 at 12:10
















          Thanks for your answer. hack the .deb... works fine for me. o/ Have a good weekend!

          – fruffl
          Jun 29 '13 at 12:10





          Thanks for your answer. hack the .deb... works fine for me. o/ Have a good weekend!

          – fruffl
          Jun 29 '13 at 12:10













          0














          Have you tried to remove the file with rm and then re-install the package?



          If it doesn't work, you can try aptitude purge or apt-get remove --purge to remove the package and all its configuration files. Then, install it again and you will get the default configuration file.



          If nothing works, try to get the .deb file from the repo (look fo it in packages.debian.org), and untar it twice (first, the .deb package, and then the data.tar.gz that will be included inside the .deb. You must find the configuration file there.






          share|improve this answer























          • Frankly, I'd suggest opening the deb (with something like mc which does the unpacking transparently for you and can view and copy files out of there) over remove-reinstall, because it's pretty sure to be less-destructive.

            – Ulrich Schwarz
            Jun 29 '13 at 11:02











          • @JoseLSegura Thanks for your answer. Yes: I've removed the file before reinstall the package. The installer doesn't create a new copy. I think purge is not the best solution in this case: running system vs. one missing textfile.

            – fruffl
            Jun 29 '13 at 12:09















          0














          Have you tried to remove the file with rm and then re-install the package?



          If it doesn't work, you can try aptitude purge or apt-get remove --purge to remove the package and all its configuration files. Then, install it again and you will get the default configuration file.



          If nothing works, try to get the .deb file from the repo (look fo it in packages.debian.org), and untar it twice (first, the .deb package, and then the data.tar.gz that will be included inside the .deb. You must find the configuration file there.






          share|improve this answer























          • Frankly, I'd suggest opening the deb (with something like mc which does the unpacking transparently for you and can view and copy files out of there) over remove-reinstall, because it's pretty sure to be less-destructive.

            – Ulrich Schwarz
            Jun 29 '13 at 11:02











          • @JoseLSegura Thanks for your answer. Yes: I've removed the file before reinstall the package. The installer doesn't create a new copy. I think purge is not the best solution in this case: running system vs. one missing textfile.

            – fruffl
            Jun 29 '13 at 12:09













          0












          0








          0







          Have you tried to remove the file with rm and then re-install the package?



          If it doesn't work, you can try aptitude purge or apt-get remove --purge to remove the package and all its configuration files. Then, install it again and you will get the default configuration file.



          If nothing works, try to get the .deb file from the repo (look fo it in packages.debian.org), and untar it twice (first, the .deb package, and then the data.tar.gz that will be included inside the .deb. You must find the configuration file there.






          share|improve this answer













          Have you tried to remove the file with rm and then re-install the package?



          If it doesn't work, you can try aptitude purge or apt-get remove --purge to remove the package and all its configuration files. Then, install it again and you will get the default configuration file.



          If nothing works, try to get the .deb file from the repo (look fo it in packages.debian.org), and untar it twice (first, the .deb package, and then the data.tar.gz that will be included inside the .deb. You must find the configuration file there.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jun 29 '13 at 10:58









          JoseLSeguraJoseLSegura

          2221413




          2221413












          • Frankly, I'd suggest opening the deb (with something like mc which does the unpacking transparently for you and can view and copy files out of there) over remove-reinstall, because it's pretty sure to be less-destructive.

            – Ulrich Schwarz
            Jun 29 '13 at 11:02











          • @JoseLSegura Thanks for your answer. Yes: I've removed the file before reinstall the package. The installer doesn't create a new copy. I think purge is not the best solution in this case: running system vs. one missing textfile.

            – fruffl
            Jun 29 '13 at 12:09

















          • Frankly, I'd suggest opening the deb (with something like mc which does the unpacking transparently for you and can view and copy files out of there) over remove-reinstall, because it's pretty sure to be less-destructive.

            – Ulrich Schwarz
            Jun 29 '13 at 11:02











          • @JoseLSegura Thanks for your answer. Yes: I've removed the file before reinstall the package. The installer doesn't create a new copy. I think purge is not the best solution in this case: running system vs. one missing textfile.

            – fruffl
            Jun 29 '13 at 12:09
















          Frankly, I'd suggest opening the deb (with something like mc which does the unpacking transparently for you and can view and copy files out of there) over remove-reinstall, because it's pretty sure to be less-destructive.

          – Ulrich Schwarz
          Jun 29 '13 at 11:02





          Frankly, I'd suggest opening the deb (with something like mc which does the unpacking transparently for you and can view and copy files out of there) over remove-reinstall, because it's pretty sure to be less-destructive.

          – Ulrich Schwarz
          Jun 29 '13 at 11:02













          @JoseLSegura Thanks for your answer. Yes: I've removed the file before reinstall the package. The installer doesn't create a new copy. I think purge is not the best solution in this case: running system vs. one missing textfile.

          – fruffl
          Jun 29 '13 at 12:09





          @JoseLSegura Thanks for your answer. Yes: I've removed the file before reinstall the package. The installer doesn't create a new copy. I think purge is not the best solution in this case: running system vs. one missing textfile.

          – fruffl
          Jun 29 '13 at 12:09











          0














          just create an empty file before re-installing



          sudo touch /etc/init.d/pure-ftpd-mysql


          then reinstall with --purge flag (it removes a library with this file, and creates a new work file)



          sudo apt-get remove pure-ftpd-mysql --purge

          sudo apt-get install pure-ftpd-mysql





          share|improve this answer

























          • Welcome to Unix&Linux!  The above essentially duplicates another answer and adds no new content.  Please don’t post an answer unless you actually have something new to contribute.  But also, we’re looking for comprehensive, high-quality answers that provide some explanation and context.  Don’t just give a bunch of sudo commands; explain why your answer is right, ideally with citations, and at the very least with sentences.  Answers that don’t include explanations may be removed.

            – G-Man
            May 25 '15 at 9:40















          0














          just create an empty file before re-installing



          sudo touch /etc/init.d/pure-ftpd-mysql


          then reinstall with --purge flag (it removes a library with this file, and creates a new work file)



          sudo apt-get remove pure-ftpd-mysql --purge

          sudo apt-get install pure-ftpd-mysql





          share|improve this answer

























          • Welcome to Unix&Linux!  The above essentially duplicates another answer and adds no new content.  Please don’t post an answer unless you actually have something new to contribute.  But also, we’re looking for comprehensive, high-quality answers that provide some explanation and context.  Don’t just give a bunch of sudo commands; explain why your answer is right, ideally with citations, and at the very least with sentences.  Answers that don’t include explanations may be removed.

            – G-Man
            May 25 '15 at 9:40













          0












          0








          0







          just create an empty file before re-installing



          sudo touch /etc/init.d/pure-ftpd-mysql


          then reinstall with --purge flag (it removes a library with this file, and creates a new work file)



          sudo apt-get remove pure-ftpd-mysql --purge

          sudo apt-get install pure-ftpd-mysql





          share|improve this answer















          just create an empty file before re-installing



          sudo touch /etc/init.d/pure-ftpd-mysql


          then reinstall with --purge flag (it removes a library with this file, and creates a new work file)



          sudo apt-get remove pure-ftpd-mysql --purge

          sudo apt-get install pure-ftpd-mysql






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 25 '15 at 10:34

























          answered May 25 '15 at 8:27









          Ivan RaveIvan Rave

          1114




          1114












          • Welcome to Unix&Linux!  The above essentially duplicates another answer and adds no new content.  Please don’t post an answer unless you actually have something new to contribute.  But also, we’re looking for comprehensive, high-quality answers that provide some explanation and context.  Don’t just give a bunch of sudo commands; explain why your answer is right, ideally with citations, and at the very least with sentences.  Answers that don’t include explanations may be removed.

            – G-Man
            May 25 '15 at 9:40

















          • Welcome to Unix&Linux!  The above essentially duplicates another answer and adds no new content.  Please don’t post an answer unless you actually have something new to contribute.  But also, we’re looking for comprehensive, high-quality answers that provide some explanation and context.  Don’t just give a bunch of sudo commands; explain why your answer is right, ideally with citations, and at the very least with sentences.  Answers that don’t include explanations may be removed.

            – G-Man
            May 25 '15 at 9:40
















          Welcome to Unix&Linux!  The above essentially duplicates another answer and adds no new content.  Please don’t post an answer unless you actually have something new to contribute.  But also, we’re looking for comprehensive, high-quality answers that provide some explanation and context.  Don’t just give a bunch of sudo commands; explain why your answer is right, ideally with citations, and at the very least with sentences.  Answers that don’t include explanations may be removed.

          – G-Man
          May 25 '15 at 9:40





          Welcome to Unix&Linux!  The above essentially duplicates another answer and adds no new content.  Please don’t post an answer unless you actually have something new to contribute.  But also, we’re looking for comprehensive, high-quality answers that provide some explanation and context.  Don’t just give a bunch of sudo commands; explain why your answer is right, ideally with citations, and at the very least with sentences.  Answers that don’t include explanations may be removed.

          – G-Man
          May 25 '15 at 9:40

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f81119%2fhow-to-restore-the-etc-init-d-pure-ftpd-mysql%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown






          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)