S
S
Sergey Pugovkin2017-07-19 13:41:14
bash
Sergey Pugovkin, 2017-07-19 13:41:14

How to execute code in Debian after system restart (need to run memcached)?

#!/bin/bash
mkdir /run/memcached
chown www-data /run/memcached
service memcached start

How to execute automatically after Debian start?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
7
776166, 2017-08-05
@776166

In this case, fix the fam service (/etc/init.d/memcached), but this is a very bad option. Or rather, not very good. You can raise your personal memcached on another port with your own settings, leaving the default one as it is.
Optional:
/var/run/ is not really intended for storing data ( https://ru.wikipedia.org/wiki/FHS). Your data should be put in /tmp/memcached or even in /run/shm/memcached

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question