0

All the tinyproxy "How-To" on the internet expect init.d to be reponsible for starting the tinyproxy daemon.

But how to use tinyproxy on a recent, say cenotos7 machine, where traditional init scripts are no longer used? Thre is no /etc/init.d/tinyproxy sript created by the installation...

My first try:

yum install -y epel-release
yum update
yum -y install tinyproxy

tinyproxy -d

with response:

tinyproxy: Could not open file /var/log/tinyproxy/tinyproxy.log: Permission denied
tinyproxy: Could not create file /var/run/tinyproxy/tinyproxy.pid: Permission denied
tinyproxy: Could not create PID file.
4
  • You can still use init.d files on systemd, it has a compatibility mode. But in your case you need to create the two tinyproxy directories above as root and hand them over to the runtime user.
    – eckes
    May 17 '17 at 8:21
  • @eckes Those directories already exit but they are owned by tinyproxy... (see my answer). But thre is no /etc/init.d/tinyproxy sript created by the installation...
    – dedek
    May 17 '17 at 8:30
  • 1
    Then installing the init script will be enough, it should already contain the sudo. (However I would the EPEL package to simply work. Maybe it needs a enabled=true setting somewhere?)
    – eckes
    May 17 '17 at 8:32
  • Finally I found the right way. Thanks @eckes for hlep!
    – dedek
    May 17 '17 at 8:48
1

Finally I can start the proxy with command:

sudo su tinyproxy  -s /bin/sh -c 'tinyproxy -d'

or as a daemon with:

sudo su tinyproxy  -s /bin/sh -c tinyproxy

Edit: Finally I found the right way:

(Sorry for a beginner's question, but hopefully may be useful to someone like me...)

systemctl start tinyproxy
systemctl enable tinyproxy
1
  • Note that the systemctl service is only available when you install tinyproxy using the rpm. It won't be there if you install from source. Sep 4 '18 at 19:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.