Note that there are some explanatory texts on larger screens.

plurals
  1. POdpkg remove to stop processes
    text
    copied!<p>I am currently running Ubuntu 12.04. I've created a debian package that currently installs successfully and starts three new processes. I have also made these three processes start at runtime by placing the following script inside /etc/init.d:</p> <pre><code># This example is from http://www.debian-administration.org/article/Making_scripts_run_at_boot_time_with_Debian # Also used http://wiki.debian.org/LSBInitScripts/ ### BEGIN INIT INFO # Provides: bleh # Required-Start: $remote_fs $syslog $network # Required-Stop: $remote_fs $syslog $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start daemon at boot time # Description: Enable service provided by daemon. ### END INIT INFO # Carry out specific functions when asked to by the system case "$1" in start) cd //opt/bleh attrf=.gatewayattributes if [ ! -z "$1" ] then echo "[gateway]" &gt;&gt; $attrf echo "activationKey = $1" &gt;&gt; $attrf fi ./bleh1 -n &amp; ./bleh2 &amp; python bleh3 &amp; ;; stop) cd //opt/bleh /usr/bin/pkill -f ./bleh1 -n /usr/bin/pkill -f bleh3 kill -9 $(pidof bleh2) rm -rf logs ;; </code></pre> <p>This script does start the three processes at runtime, but for some reason I cannot actually use the start/stop commands, as in sudo /etc/init.d bleh.sh stop. </p> <p>An even bigger issue is that removing this package using the command: sudo dpkg -r bleh</p> <p>Does not actually stop the three processes, it only tries to remove the bleh directory I installed in my opt folder. Also, I have a folder inside my bleh directory which does not get removed, it gives me a warning stating: Removing bleh ... dpkg: warning: while removing bleh, directory '/opt/bleh/logs' not empty so not removed.</p> <p>The files inside of that logs directory are read-only unless you have SU priviledges, but I don't see how that should be a problem as I am calling sudo on that dpkg -r command.</p> <p>If I run sudo dpkg -r bleh again, it states there's no installed package matching bleh, meaning it thinks it has successfully removed the installed package, even with that exisiting logs directory and the three processes which are still running.</p> <p>Sorry, I know this was long, but I could really use some help.. thanks in advance!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload