How to activate service aftering mounting in systemd The Next CEO of Stack OverflowHow to set environment variable in systemd service?Suddenly mysql/mariadb won't startFind the location of a systemd serviceDo systemd unit files have to be reloaded when modified?Start systemd service conditionally?OEL 7.2 with LACP systemd shutdowns networking before umounting _netdev filesystemsSystemd service: Failed to issue method call: Unit service failedKilling systemd service with and without systemctlsystemctl stops Tomcat service immediately after startDisabling systemd messages that interfere with running BASH script
Yu-Gi-Oh cards in Python 3
Would a completely good Muggle be able to use a wand?
My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?
Is dried pee considered dirt?
What was the first Unix version to run on a microcomputer?
Help! I cannot understand this game’s notations!
(How) Could a medieval fantasy world survive a magic-induced "nuclear winter"?
Would a grinding machine be a simple and workable propulsion system for an interplanetary spacecraft?
Can this note be analyzed as a non-chord tone?
I dug holes for my pergola too wide
Does destroying a Lich's phylactery destroy the soul within it?
Why the last AS PATH item always is `I` or `?`?
Is it okay to majorly distort historical facts while writing a fiction story?
Prepend last line of stdin to entire stdin
Reference request: Grassmannian and Plucker coordinates in type B, C, D
Is "three point ish" an acceptable use of ish?
TikZ: How to fill area with a special pattern?
Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?
Is a distribution that is normal, but highly skewed, considered Gaussian?
Traduction de « Life is a roller coaster »
Expressing the idea of having a very busy time
Is it convenient to ask the journal's editor for two additional days to complete a review?
How did Beeri the Hittite come up with naming his daughter Yehudit?
What difference does it make using sed with/without whitespaces?
How to activate service aftering mounting in systemd
The Next CEO of Stack OverflowHow to set environment variable in systemd service?Suddenly mysql/mariadb won't startFind the location of a systemd serviceDo systemd unit files have to be reloaded when modified?Start systemd service conditionally?OEL 7.2 with LACP systemd shutdowns networking before umounting _netdev filesystemsSystemd service: Failed to issue method call: Unit service failedKilling systemd service with and without systemctlsystemctl stops Tomcat service immediately after startDisabling systemd messages that interfere with running BASH script
I want to mount aria2c service after mount mnt-usb.mount. The following config file work as expected but after mnt-usb.mount inactive and active again (because of unpluging and plug the device again) the aria2c not active again.
aria2c.service
[Unit]
Description=Aria2c download manager
After=network-online.target mnt-usb.mount
Requires=network-online.target
BindsTo=mnt-usb.mount
PartOf=mnt-usb.mount
[Service]
Type=simple
User=www-data
ExecStart=/usr/bin/aria2c --enable-rpc --rpc-listen-all --conf-path=/etc/aria2.daemon
Restart=always
[Install]
WantedBy=multi-user.target
mnt-usb.mount
[Unit]
Description=mount usb
[Mount]
What=/dev/disk/by-uuid/some-uuid
Where=/mnt/usb
Type=ntfs
Options=defaults
[Install]
WantedBy=multi-user.target

systemd systemctl
add a comment |
I want to mount aria2c service after mount mnt-usb.mount. The following config file work as expected but after mnt-usb.mount inactive and active again (because of unpluging and plug the device again) the aria2c not active again.
aria2c.service
[Unit]
Description=Aria2c download manager
After=network-online.target mnt-usb.mount
Requires=network-online.target
BindsTo=mnt-usb.mount
PartOf=mnt-usb.mount
[Service]
Type=simple
User=www-data
ExecStart=/usr/bin/aria2c --enable-rpc --rpc-listen-all --conf-path=/etc/aria2.daemon
Restart=always
[Install]
WantedBy=multi-user.target
mnt-usb.mount
[Unit]
Description=mount usb
[Mount]
What=/dev/disk/by-uuid/some-uuid
Where=/mnt/usb
Type=ntfs
Options=defaults
[Install]
WantedBy=multi-user.target

systemd systemctl
add a comment |
I want to mount aria2c service after mount mnt-usb.mount. The following config file work as expected but after mnt-usb.mount inactive and active again (because of unpluging and plug the device again) the aria2c not active again.
aria2c.service
[Unit]
Description=Aria2c download manager
After=network-online.target mnt-usb.mount
Requires=network-online.target
BindsTo=mnt-usb.mount
PartOf=mnt-usb.mount
[Service]
Type=simple
User=www-data
ExecStart=/usr/bin/aria2c --enable-rpc --rpc-listen-all --conf-path=/etc/aria2.daemon
Restart=always
[Install]
WantedBy=multi-user.target
mnt-usb.mount
[Unit]
Description=mount usb
[Mount]
What=/dev/disk/by-uuid/some-uuid
Where=/mnt/usb
Type=ntfs
Options=defaults
[Install]
WantedBy=multi-user.target

systemd systemctl
I want to mount aria2c service after mount mnt-usb.mount. The following config file work as expected but after mnt-usb.mount inactive and active again (because of unpluging and plug the device again) the aria2c not active again.
aria2c.service
[Unit]
Description=Aria2c download manager
After=network-online.target mnt-usb.mount
Requires=network-online.target
BindsTo=mnt-usb.mount
PartOf=mnt-usb.mount
[Service]
Type=simple
User=www-data
ExecStart=/usr/bin/aria2c --enable-rpc --rpc-listen-all --conf-path=/etc/aria2.daemon
Restart=always
[Install]
WantedBy=multi-user.target
mnt-usb.mount
[Unit]
Description=mount usb
[Mount]
What=/dev/disk/by-uuid/some-uuid
Where=/mnt/usb
Type=ntfs
Options=defaults
[Install]
WantedBy=multi-user.target

systemd systemctl
systemd systemctl
asked yesterday
o0omycomputero0oo0omycomputero0o
1162
1162
add a comment |
add a comment |
0
active
oldest
votes
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f960719%2fhow-to-activate-service-aftering-mounting-in-systemd%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Server Fault!
- 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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f960719%2fhow-to-activate-service-aftering-mounting-in-systemd%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
