Skip to content

Instantly share code, notes, and snippets.

@voidman
voidman / jobrestart
Last active August 29, 2015 14:11
Restart supervisor job
function jobrestart()
{
if [ "$1" = "" ]; then
echo "请输入任务名称"
return
fi
sudo supervisorctl -c /data/code/supervisord.conf status | grep $1 | awk '{print $1 }' | xargs sudo supervisorctl -c /data/code/supervisord.conf restart
}
用法:
@voidman
voidman / debian-select-editor
Created February 9, 2013 10:19
修改 Debian 默认编辑器
输入命令:
pi@raspberrypi ~ $ update-alternatives --config editor
有 4 个候选项可用于替换 editor (提供 /usr/bin/editor)。
选择 路径 优先级 状态
------------------------------------------------------------
* 0 /bin/nano 40 自动模式
1 /bin/ed -100 手动模式